Csound Csound-dev Csound-tekno Search About

[Csnd] Re: GCC Linux

Date2008-08-23 23:07
Fromvictor
Subject[Csnd] Re: GCC Linux
But you don't link to librtalsa, because that is a loadable
module not a  library to be linked to.
 
Unless there is a build problem with libcsound.so, you only need to
link an API host to libcsound and libsndfile. Alsa (libasound.so) etc
are dependencies of plugins, not of the main csound library.
 
However if libcsound.so was given a -lasound on its linking stage, it might
just require it (even though that is spurious and not needed). In that case,
really SConstruct is buggy and needs to be fixed.
 
libasound.so should only be dependency of librtalsa.so (and not libcsound.so)
 
Victor  
----- Original Message -----
Sent: Saturday, August 23, 2008 10:30 PM
Subject: [Csnd] GCC Linux

re: GCC differences MinGW and Linux for simple api example.

Thanks for info on reading about ld.  I see the benefits of installing a build and using standard library locations such as /usr/lib on linux.

re: ldconfig, on fedora there is an /etc/ld.so.config.d folder into which files are deposited (ex. csound.conf).  The file lists the path to a directory for .so searches.  Thus depositing the file, and running /sbin/ldconfig
updates the directories being searched for .so libs.  Seems to work for non-installed builds as alternative to using the LD_LIBRARY_PATH environ variable for running a binary with .so linking, and is bash scriptable.
 
But still a bit hazy why, if not using standard install, linking to just one .so lib (ex. librtalsa.so) avoids all the undef ref errors located throughout the various csound source files.  I guess I'm thinking there must be a concrete solution, rather than the serendipitous one I stumbled across (ex. seems like it should be something like: -L. -lcsound -l*.so)

ex. gcc -Wall -O2 -IH -o test test.c -L. -lcsound -lrtalsa




Get thousands of games on your PC, your mobile phone, and the web with Windows®. Game with Windows

Date2008-08-24 01:20
Fromjhearon
Subject[Csnd] Re: GCC Linux
Yes, I understand about the plugins and .so libs.
re: gcc linux, non installed build, I have been building a static lib,
libcsound.a and linking to that because the dynamic option in Sconstruct
which produces a libcsound.so gives the error message:
WARNING: not loading 'libscansyn.so' (incompatible with this version of
Csound), etc. for each plugin lib.
I have set the environment variables OPCODEDIR, and OPCODEDIR64 before the
build. Also the Type for libcsound.so in gnome shows as as 'link(broken)'
after the build.

libsndfile, and all other external libs are built and installed wherever
they should go by yum or software updates, and thus those are easy to work
with.

-----
...just plain vanilla build:

#! /bin/sh
/usr/bin/python2.5 /usr/bin/scons-0.98.4 useDouble=0 usePortAudio=0
usePortMIDI=0 useALSA=1 useJack=0 useFLTK=0 noFLTKThreads=1
pythonVersion=2.5 buildCsoundVST=0 buildCsoundAC=0 buildCsound5GUI=0
generateTags=0 generatePdf=0 buildLoris=0 useOSC=0 bufferoverflowu=0
useUDP=0 buildPythonOpcodes=0 buildRelease=0 noDebug=0 gcc3opt=0 gcc4opt=0
useLrint=0 useGprof=0 Word64=0 Lib64=0 dynamicCsoundLibrary=1
buildStkOpcodes=0 install=0 buildPDClass=0 useCoreAudio=0 useAltivec=0
buildDSSI=0 buildUtilities=0 buildTclcsound=0 buildWinsound=0 buildVirtual=0
buildInterfaces=0 buildJavaWrapper=0 buildOSXGUI=0 buildCSEditor=0 withICL=0
withMSVC=0 buildNewParser=0 buildvst4cs=0 buildSDFT=0 useGettext=0
buildImageOpcodes=0 buildOLPC=0 tclversion=8.5 $1 $2 $3 $4

JimH.


-- 
View this message in context: http://www.nabble.com/GCC-Linux-tp19125535p19126635.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2008-08-24 19:45
Fromjhearon
Subject[Csnd] Re: GCC Linux
...a little more on this.

for the uninstalled build, I provoked fedora (9) to fix the dynamic
libcsound.so broken link by /sbin/ldconfig, after placing a csound.conf with
path to uninstalled build dir in /etc/ld.so.config.d.  Then simple api
compiler ex. works with just dynamic lib link using libcsound.so,  gcc -Wall
-O2 -IH -o test test.c -L. -llibcsound.  But this seems just as much work as
using the static lib (libcsound.a) and including at least one .so, then also
updating /sbin/ldconfig to find paths to .so libs, etc. But seems like using
environ var LD_LIBRARY_PATH, or /sbin/ldconfig to locate .so libs for
uninstalled dynamic or static build is what needs to be done.

Makes me think installing at least one build on fedora is a good idea for
ld, but Sconstruct opt to install target doesn't seem to do anything on
fedora.  I know fedora has a csound package, but it's down rev., also the
Planet CCRMA rpm had some interesting ways of installing Csound on fedora,
and that was down rev. too.  I might dink around with a manual install
moving .so libs to /usr/local or /usr/lib and placing libcsound.so.5.1 in
/usr/lib, setting paths and see if that works any better.

thanks.



-- 
View this message in context: http://www.nabble.com/GCC-Linux-tp19125535p19133473.html
Sent from the Csound - General mailing list archive at Nabble.com.