Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:4636] Updated Csound 5 compile errors

Date2004-05-10 01:20
Fromiainduncan@telus.net
Subject[CSOUND-DEV:4636] Updated Csound 5 compile errors
Ok, to resummarize, all necessary dependencies have been installed or emerged.
Now custom.py knows where python.h is. I don't think that changed my errors any
though:

With all options on in SConstruct as per default:

./libcsound.a(main.o)(.text+0x503): In function `csoundCompile':
Top/main.c:423: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/../../../crt1.o(.text+0x18): In
function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status
scons: *** [_CsoundVST.so] Error 1
scons: building terminated because of errors.


With CsoundVST turned off:

sh: line 1: etags: command not found
scons: *** [TAGS] Error 127
scons: building terminated because of errors.

With tags turned off:
/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/../../../../i386-pc-linux-gnu/bin/ld:
cannot find -lasound
collect2: ld returned 1 exit status
scons: *** [cscore] Error 1
scons: building terminated because of errors.


Thanks
Iain

Date2004-05-10 05:24
FromJohn ffitch
Subject[CSOUND-DEV:4643] Re: Updated Csound 5 compile errors
Not sure if this is your problem or not, but on my Linux set-ups ALSA is 
only available as a dynamic library, so I always have to use makeDynamic=1 
in scons.  Try 'locate libasound' and see if you have the library, and if 
it is static or dynamic
==John ff

Date2004-05-10 09:23
Fromiainduncan@telus.net
Subject[CSOUND-DEV:4647] Re: Updated Csound 5 compile errors
Thanks for the tips everyone, I'm keep track of them all so we can do an idiot's
guide to compiling by the end of this. ; )

Ok, libasound is located:
/usr/lib/libasound.so.2.0.0
/usr/lib/libasound.so.2
/usr/lib/libasound.so
/usr/lib/libasound.la
/usr/lib/libasound.so.1

My errors said:
gcc -static -o cscore util1/cscore/cscore_main.o -L. -L. -L. -L/usr/lib
-L/usr/local/lib -L/usr/local/lib -L/usr/X11R6/lib -lcsound -lsndfile -lfltk
-lpthread -lm -lXext -lX11 -lsupc++ -lportaudio -lasound -lfltk -lstdc++
-lpthread -lm -ldl
/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/../../../../i386-pc-linux-gnu/bin/ld:
cannot find -lasound

I assume the above means it looked in /usr/lib? However, I don't know how to
tell if this is dynamic or static, or whether it is in the right place. Do I
just look at the compiler output and see what dir is being searched?

Next, if I use makeDynamic=1:

gcc -o hetro anal/adsyn/het_main.o -L. -L. -L. -L/usr/lib -L/usr/local/lib
-lustub -lsndfile -lstdc++ -lpthread -lm -ldl
gcc " -shared" -o libbabo.so Opcodes/babo.os -L. -L. -L. -L/usr/lib -L/usr/local/lib
gcc:  -shared: No such file or directory
scons: *** [libbabo.so] Error 1
scons: building terminated because of errors.

I think I got further, but I have no clue what the above means.

As to how to install stuff, so far I've noticed that Gentoo's emerge method puts
everything in the right places, but could this vary package by package? It would
be nice to keep track of that element too, as I must say Gentoo was an absolute
breeze to get alsa audio and midi working, as well as patched kernels.

Thanks
Iain  

> Not sure if this is your problem or not, but on my Linux set-ups ALSA is 
> only available as a dynamic library, so I always have to use makeDynamic=1 
> in scons.  Try 'locate libasound' and see if you have the library, and if 
> it is static or dynamic
> ==John ff
> 
> 


Date2004-05-10 09:24
Fromiainduncan@telus.net
Subject[CSOUND-DEV:4648] Re: Updated Csound 5 compile errors
I forgot to mention that PortAudio was installed by cvs and makefile, not by
emerge. Alsa, python, scons, and fltk were all emerged.

> Not sure if this is your problem or not, but on my Linux set-ups ALSA is 
> only available as a dynamic library, so I always have to use makeDynamic=1 
> in scons.  Try 'locate libasound' and see if you have the library, and if 
> it is static or dynamic
> ==John ff
> 
> 


Date2004-05-10 09:55
FromJohn ffitch
Subject[CSOUND-DEV:4649] Re: Updated Csound 5 compile errors
On Mon, 10 May 2004 iainduncan@telus.net wrote:

> Thanks for the tips everyone, I'm keep track of them all so we can do an idiot's
> guide to compiling by the end of this. ; )
> 
> Ok, libasound is located:
> /usr/lib/libasound.so.2.0.0
> /usr/lib/libasound.so.2
> /usr/lib/libasound.so
> /usr/lib/libasound.la
> /usr/lib/libasound.so.1

So it is dynamic only.  A statioc library would have the name libcsound.a

> 
> My errors said:
> gcc -static -o cscore util1/cscore/cscore_main.o -L. -L. -L. -L/usr/lib
> -L/usr/local/lib -L/usr/local/lib -L/usr/X11R6/lib -lcsound -lsndfile -lfltk
> -lpthread -lm -lXext -lX11 -lsupc++ -lportaudio -lasound -lfltk -lstdc++
> -lpthread -lm -ldl
> /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/../../../../i386-pc-linux-gnu/bin/ld:
> cannot find -lasound
> 

The -static says to only seek static libraries, but asound is only 
available as dynamic

> I assume the above means it looked in /usr/lib? However, I don't know how to
> tell if this is dynamic or static, or whether it is in the right place. Do I
> just look at the compiler output and see what dir is being searched?
> 
> Next, if I use makeDynamic=1:
> 
> gcc -o hetro anal/adsyn/het_main.o -L. -L. -L. -L/usr/lib -L/usr/local/lib
> -lustub -lsndfile -lstdc++ -lpthread -lm -ldl
> gcc " -shared" -o libbabo.so Opcodes/babo.os -L. -L. -L. -L/usr/lib -L/usr/local/lib
> gcc:  -shared: No such file or directory
> scons: *** [libbabo.so] Error 1
> scons: building terminated because of errors.

Hum.   I did not get that error last time I built.   And the string 
"-shared" does not appear in my SConstruct at all.  

> 
> I think I got further, but I have no clue what the above means.

It means that the option " -shared" has crept into the build of libbabo.so 
when it should not have the leading space.  If you can find who introduced 
the space all is cool.

> 
> As to how to install stuff, so far I've noticed that Gentoo's emerge method puts
> everything in the right places, but could this vary package by package? It would
> be nice to keep track of that element too, as I must say Gentoo was an absolute
> breeze to get alsa audio and midi working, as well as patched kernels.
> 
> Thanks
> Iain  
> 

There are a whole set of confusing guidelines as to where things go.  
Built from source stuff goes in /usr/local while packages tend to go in 
/usr/share unless they are system basics when they go in /usr or /

Glad you found gentoo OK; when I tried it computed for 31hrs continuous 
before crashing.  I went back to Debian

==John ff