Re: [CM] s7, undefined reference errors
Hi, snd configure... ./configure --with-s7 --with-gsl --with-motif --with-gl --with-gmp --with-alsa CFLAGS=HAVE_COMPLEX_NUMBERS CFLAGS=HAVE_COMPLEX_TRIG CFLAGS="-I/usr/include/linux/param.h" Oops, I guess I did compile with gimp. I'm not sure why I did that. Must have been something I was trying to see perhaps related to gl. Thanks so much for pointing out that problem. re: all my compile times are usually over a minute, but I've been using lots of lets set!, and patterns, so I figured that was it. I'll recompile snd without gimp and see how that goes. Regards, Jim ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist
Re: [CM] s7, undefined reference errors
By the way, have you measured any difference in performance for non-bignumbers when using WITH_GMP? The gmp version is always slower, sometimes a lot slower (more than a factor of 10). I was using gmp/mpfr for some (for lack of a less pompous word) research and didn't care about the speed. In numerical contexts, the multiprecision library calls completely dominate (99% of the compute time), so I didn't try to optimize the other 1%. I plead lack of time and energy! I've reached that point in life that if I try to work harder, I instantly fall asleep. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist
Re: [CM] s7, undefined reference errors
By the way, have you measured any difference in performance for non-bignumbers when using WITH_GMP? On Mon, Sep 19, 2016 at 8:41 PM, wrote: > As Kjetil points out, you must have configured Snd > with --with-gmp or somehow created mus-config.h > with WITH_GMP set to 1. That file does not come with > s7 (on the theory that people will read the instructions). > If you want to use gmp, you'll need -lgmp -lmpfr -lmpc. > If not, just delete whatever is in mus-config.h and > recompile s7, or run configure again (for Snd) without > --with-gmp, make clean, make. > > ___ > Cmdist mailing list > Cmdist@ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > > ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist
Re: [CM] s7, undefined reference errors
As Kjetil points out, you must have configured Snd with --with-gmp or somehow created mus-config.h with WITH_GMP set to 1. That file does not come with s7 (on the theory that people will read the instructions). If you want to use gmp, you'll need -lgmp -lmpfr -lmpc. If not, just delete whatever is in mus-config.h and recompile s7, or run configure again (for Snd) without --with-gmp, make clean, make. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist
Re: [CM] s7, undefined reference errors
On Mon, Sep 19, 2016 at 7:57 PM, James Hearon wrote: > Hi, > > I was trying to get back to looking at s7 as interpreter but I'm failing > to compile for some reason. > > > I have s7.o, s7.h, and snd is working ok. But I'm getting undefined ref > errors trying to compile below and a little stumped what might be going > wrong? Seems like it's not finding something it needs. > > > //gcc -o repel_test repel_test.c s7.o -Wl,-export-dynamic -lm -I. -ldl > #include "/opt/snd-16/s7.h" > int main (int argc, char **argv) > { > s7_scheme *sc; > sc = s7_init(); > s7_load(sc, "/opt/snd-16/repl.scm"); > s7_eval_c_string(sc, "((*repl* 'run))"); > return(0); > } > > - > > /opt/snd-16/s7.o: In function `sweep': > s7.c:(.text+0x1b40): undefined reference to `__gmpz_clear' > Hi, It seems like you compile s7 with "WITH_GMP" defined somehow. Perhaps you have a mus-config.h file where WITH_GMP is defined? I guess it compiles if you remove WITH_GMP from mus-config.h, or link in libgmp: -lgmp ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist
[CM] s7, undefined reference errors
Hi, I was trying to get back to looking at s7 as interpreter but I'm failing to compile for some reason. I have s7.o, s7.h, and snd is working ok. But I'm getting undefined ref errors trying to compile below and a little stumped what might be going wrong? Seems like it's not finding something it needs. //gcc -o repel_test repel_test.c s7.o -Wl,-export-dynamic -lm -I. -ldl #include "/opt/snd-16/s7.h" int main (int argc, char **argv) { s7_scheme *sc; sc = s7_init(); s7_load(sc, "/opt/snd-16/repl.scm"); s7_eval_c_string(sc, "((*repl* 'run))"); return(0); } - /opt/snd-16/s7.o: In function `sweep': s7.c:(.text+0x1b40): undefined reference to `__gmpz_clear' s7.c:(.text+0x1bdf): undefined reference to `__gmpq_clear' s7.c:(.text+0x1c7e): undefined reference to `mpfr_clear' s7.c:(.text+0x1d1d): undefined reference to `mpc_clear' /opt/snd-16/s7.o: In function `s7_number_to_real_with_caller': s7.c:(.text+0x1e272): undefined reference to `mpfr_get_d' /opt/snd-16/s7.o: In function `s7_real': s7.c:(.text+0x1e470): undefined reference to `mpfr_get_d' /opt/snd-16/s7.o: In function `s7_is_negative': s7.c:(.text+0x1e956): undefined reference to `mpfr_sgn' /opt/snd-16/s7.o: In function `s7_is_positive': s7.c:(.text+0x1ea20): undefined reference to `mpfr_sgn' /opt/snd-16/s7.o: In function `s7_real_part': ... /opt/snd-16/s7.o: In function `s7_random': s7.c:(.text+0x12e539): undefined reference to `mpfr_get_d' /opt/snd-16/s7.o: In function `s7_gmp_init': s7.c:(.text+0x12f864): undefined reference to `mpfr_set_default_prec' /opt/snd-16/s7.o: In function `s7_init': s7.c:(.text+0x13efa2): undefined reference to `__gmpz_init_set_ui' s7.c:(.text+0x13efb5): undefined reference to `__gmp_randinit_default' s7.c:(.text+0x13efd2): undefined reference to `__gmp_randseed' s7.c:(.text+0x13efe1): undefined reference to `__gmpz_clear' collect2: error: ld returned 1 exit status Regards, Jim ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist