[yoshimi] Re: Building Yoshimi FreeBSD

  • From: Andrew Deryabin <andrew@xxxxxxxx>
  • To: yoshimi@xxxxxxxxxxxxx
  • Date: Thu, 26 Oct 2017 08:44:11 +0400

Hi blubee,


In freebsd there is no srandom_r family of functions, only srandom, random etc., i.e. without '_r' postfix. Difference between them is critical to multi-threaded code, because *bsd versions use global variable to store state unlike '_r' glibc functions. In yoshimi all generation is executed in one thread, so I think it should be safe to replace these by ordinal versions. You can try to make changes to your copy of code. Hope that this is the only error, that is not compatible with *bsd :).


Regards,

Andrew


26.10.2017 06:36, blubee blubeeme пишет:

I actually just found this file on github: https://github.com/Yoshimi/yoshimi/blob/master/src/Misc/SynthEngine.h
which shows that:
#if (HAVE_RANDOM_R)

        struct random_data random_buf;

        int32_t random_result;

        #else

        long int random_result;

        #endif

but it seems that part is missing from my code somehow.

Can any random number generation function work in its place, such as: https://www.freebsd.org/cgi/man.cgi?query=random&apropos=0&sektion=3&manpath=FreeBSD+8.1-RELEASE&format=html

of is there special considerations for your random number generator?


On Thu, Oct 26, 2017 at 10:26 AM, blubee blubeeme <gurenchan@xxxxxxxxx <mailto:gurenchan@xxxxxxxxx>> wrote:

    Thanks for the tip, where is the declaration of struct random_data?

    I am getting a forward declaration compile error and looking
    through the files I see random_buff but it isn't defined anywhere:

    work/yoshimi-1.5.4.1/src/Synth/OscilGen.cpp:38://struct
    random_data OscilGen::random_buf;
    work/yoshimi-1.5.4.1/src/Synth/OscilGen.cpp:40://struct
    random_data OscilGen::harmonic_random_buf;
    work/yoshimi-1.5.4.1/src/Synth/OscilGen.cpp:1326:        //
    srandom_r(realrnd + 1, &random_data_buf);
    work/yoshimi-1.5.4.1/src/Synth/OscilGen.h:208:        struct
    random_data random_buf;
    work/yoshimi-1.5.4.1/src/Synth/OscilGen.h:213:        struct
    random_data harmonic_random_buf;
    work/yoshimi-1.5.4.1/src/Misc/SynthEngine.h:272:        struct
    random_data random_buf;

    Where is it defined?

    On Thu, Oct 26, 2017 at 12:12 AM, Will Godfrey
    <willgodfrey@xxxxxxxxxxxxxxx <mailto:willgodfrey@xxxxxxxxxxxxxxx>>
    wrote:

        I don't know anything about freeBSD myself, but it rather
        looks like there are
        libraries missing.

        Unlesss I'm much mistaken exp10f is in cmath which is part of
        build-essential.
        I think the random functions are also in there.

        Finally, it looks as though there may also be linker issues,
        although it's
        possible that is a side effect of the other errors.

        If anyone else is familiar with BSD please step in.

        --
        Will J Godfrey
        http://www.musically.me.uk
        Say you have a poem and I have a tune.
        Exchange them and we can both have a poem, a tune, and a song.
        Yoshimi source code is available from either:
        https://sourceforge.net/projects/yoshimi
        <https://sourceforge.net/projects/yoshimi>
        Or: https://github.com/Yoshimi/yoshimi
        <https://github.com/Yoshimi/yoshimi>
        Our list archive is at:
        https://www.freelists.org/archive/yoshimi
        <https://www.freelists.org/archive/yoshimi>
        To post, email to yoshimi@xxxxxxxxxxxxx
        <mailto:yoshimi@xxxxxxxxxxxxx>




--
Regards,
Andrew

Other related posts: