Csound Csound-dev Csound-tekno Search About

[Csnd] Building 32-bit Csound on Snow Leopard, problems with sndfile

Date2010-09-02 04:32
FromJacob Joaquin
Subject[Csnd] Building 32-bit Csound on Snow Leopard, problems with sndfile
I managed to create a universal binary with 2 architectures. At least
this is what "file /usr/local/lib/libsndfile.dylib" produces:

/usr/local/lib/libsndfile.dylib: Mach-O universal binary with 2 architectures
/usr/local/lib/libsndfile.dylib (for architecture x86_64):	Mach-O
64-bit dynamically linked shared library x86_64
/usr/local/lib/libsndfile.dylib (for architecture i386):	Mach-O
dynamically linked shared library i386


The next step is to do the same for Csound. Though when I use
gcc4opt=i386, scons breaks with this message:


Checking for C library sndfile... no
The sndfile library is required to build Csound 5.


Any suggestions?  In order to get Snow Leopard to build an i386 of
libsnfile, I used these settings:


export CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk
-mmacosx-version-min=10.5 -arch i386"
export CXXFLAGS=$CFLAGS
export LDFLAGS="-Wl -syslibroot /Developer/SDKs/MacOSX10.5.sdk
-mmacosx-version-min=10.5 -arch i386"


I'm guessing I might have to set mmacosx-version-min and the SDK for
Csound as well. Though I'm not that far along with scons to try this
yet.

Best,
Jake

Date2010-09-02 08:17
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Building 32-bit Csound on Snow Leopard, problems with sndfile
You need to ensure that sndfile.h is available to the compiler. that
message occurs if either th eheader or the library are not seen in a
sinple compilation.  SCons shoul dleave a log around to show the exact
error
==John ff

> I managed to create a universal binary with 2 architectures. At least
> this is what "file /usr/local/lib/libsndfile.dylib" produces:
>
> /usr/local/lib/libsndfile.dylib: Mach-O universal binary with 2
> architectures
> /usr/local/lib/libsndfile.dylib (for architecture x86_64):	Mach-O
> 64-bit dynamically linked shared library x86_64
> /usr/local/lib/libsndfile.dylib (for architecture i386):	Mach-O
> dynamically linked shared library i386
>
>
> The next step is to do the same for Csound. Though when I use
> gcc4opt=i386, scons breaks with this message:
>
>
> Checking for C library sndfile... no
> The sndfile library is required to build Csound 5.
>
>
> Any suggestions?  In order to get Snow Leopard to build an i386 of
> libsnfile, I used these settings:
>
>
> export CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk
> -mmacosx-version-min=10.5 -arch i386"
> export CXXFLAGS=$CFLAGS
> export LDFLAGS="-Wl -syslibroot /Developer/SDKs/MacOSX10.5.sdk
> -mmacosx-version-min=10.5 -arch i386"
>
>
> I'm guessing I might have to set mmacosx-version-min and the SDK for
> Csound as well. Though I'm not that far along with scons to try this
> yet.
>
> Best,
> Jake
> --
> The Csound Blog - http://csoundblog.com/
> Slipmat - http://slipmat.noisepages.com/
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>
>
>




Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-09-02 09:07
FromVictor Lazzarini
Subject[Csnd] Re: Building 32-bit Csound on Snow Leopard, problems with sndfile
First things first: check config.log for any relevant messages. Also,  
as far as I can tell you don't need to set -isysroot to build i386  
code on OSX 10.6, only -arch i386;
maybe that has caused the problems.

Victor
On 2 Sep 2010, at 04:32, Jacob Joaquin wrote:

> I managed to create a universal binary with 2 architectures. At least
> this is what "file /usr/local/lib/libsndfile.dylib" produces:
>
> /usr/local/lib/libsndfile.dylib: Mach-O universal binary with 2  
> architectures
> /usr/local/lib/libsndfile.dylib (for architecture x86_64):	Mach-O
> 64-bit dynamically linked shared library x86_64
> /usr/local/lib/libsndfile.dylib (for architecture i386):	Mach-O
> dynamically linked shared library i386
>
>
> The next step is to do the same for Csound. Though when I use
> gcc4opt=i386, scons breaks with this message:
>
>
> Checking for C library sndfile... no
> The sndfile library is required to build Csound 5.
>
>
> Any suggestions?  In order to get Snow Leopard to build an i386 of
> libsnfile, I used these settings:
>
>
> export CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk
> -mmacosx-version-min=10.5 -arch i386"
> export CXXFLAGS=$CFLAGS
> export LDFLAGS="-Wl -syslibroot /Developer/SDKs/MacOSX10.5.sdk
> -mmacosx-version-min=10.5 -arch i386"
>
>
> I'm guessing I might have to set mmacosx-version-min and the SDK for
> Csound as well. Though I'm not that far along with scons to try this
> yet.
>
> Best,
> Jake
> -- 
> The Csound Blog - http://csoundblog.com/
> Slipmat - http://slipmat.noisepages.com/
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-09-02 17:54
FromJacob Joaquin
Subject[Csnd] Re: Re: Building 32-bit Csound on Snow Leopard, problems with sndfile
First, I recompiled libsndfile.dylib getting rid of -isysroot, and
verified that the new file is still a universal binary.  Then I
recompiled and the same issue popped up. I checked the config.log, and
here's the relevant portion:


gcc -o .sconf_temp/conftest_1 .sconf_temp/conftest_1.o -L. -L.
-L/usr/local/lib -L. -L. -L/usr/local/lib -lsndfile
ld: warning: in .sconf_temp/conftest_1.o, file was built for i386
which is not the architecture being linked (x86_64)
Undefined symbols:
  "_main", referenced from:
      start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
scons: Configure: no


My only guess is that I need to somehow specify to compile against
i386 version inside the universal lib.

And before I forget, thanks everyone for all your help so far. I don't
think I'll make it through this process with you.

Best,
Jake

Date2010-09-02 19:40
FromJacob Joaquin
Subject[Csnd] Re: Re: Building 32-bit Csound on Snow Leopard, problems with sndfile
Got it working.  This is what I had to do in SConstruct on Snow Leopard.


    if getPlatform() == 'darwin':
#      if cpuType == 'universal':
#        commonEnvironment.Prepend(CCFLAGS = Split('-O3 -arch i386
-arch ppc '))
#        commonEnvironment.Prepend(CXXFLAGS = Split('-O3 -arch i386
-arch ppc '))
#        commonEnvironment.Prepend(LINKFLAGS = Split('-arch i386 -arch ppc '))
        commonEnvironment.Prepend(CCFLAGS = Split('-O3 -arch i386 '))
        commonEnvironment.Prepend(CXXFLAGS = Split('-O3 -arch i386 '))
        commonEnvironment.Prepend(LINKFLAGS = Split('-arch i386 '))


I'm guessing Snow Leopard doesn't like trying to compile things for
ppc.  So I now compiling a version of Csound that works with
Processing. The next step is to compile Csound doubles and making it
work with Processing.  Hopefully I'll be able to release a Doubles
version of Csoundo sometime tomorrow.

Best,
Jake

Date2010-09-02 19:56
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: Building 32-bit Csound on Snow Leopard, problems with sndfile
this can be done with a different option; I'll workout and updated  
SConstruct
On 2 Sep 2010, at 19:40, Jacob Joaquin wrote:

> Got it working.  This is what I had to do in SConstruct on Snow  
> Leopard.
>
>
>    if getPlatform() == 'darwin':
> #      if cpuType == 'universal':
> #        commonEnvironment.Prepend(CCFLAGS = Split('-O3 -arch i386
> -arch ppc '))
> #        commonEnvironment.Prepend(CXXFLAGS = Split('-O3 -arch i386
> -arch ppc '))
> #        commonEnvironment.Prepend(LINKFLAGS = Split('-arch i386 - 
> arch ppc '))
>        commonEnvironment.Prepend(CCFLAGS = Split('-O3 -arch i386 '))
>        commonEnvironment.Prepend(CXXFLAGS = Split('-O3 -arch i386 '))
>        commonEnvironment.Prepend(LINKFLAGS = Split('-arch i386 '))
>
>
> I'm guessing Snow Leopard doesn't like trying to compile things for
> ppc.  So I now compiling a version of Csound that works with
> Processing. The next step is to compile Csound doubles and making it
> work with Processing.  Hopefully I'll be able to release a Doubles
> version of Csoundo sometime tomorrow.
>
> Best,
> Jake
> -- 
> The Csound Blog - http://csoundblog.com/
> Slipmat - http://slipmat.noisepages.com/
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-09-02 19:58
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: Building 32-bit Csound on Snow Leopard, problems with sndfile
But if you defined cpuType NOT as universal, that option should not  
have been taken; it is strange.
On 2 Sep 2010, at 19:40, Jacob Joaquin wrote:

> Got it working.  This is what I had to do in SConstruct on Snow  
> Leopard.
>
>
>    if getPlatform() == 'darwin':
> #      if cpuType == 'universal':
> #        commonEnvironment.Prepend(CCFLAGS = Split('-O3 -arch i386
> -arch ppc '))
> #        commonEnvironment.Prepend(CXXFLAGS = Split('-O3 -arch i386
> -arch ppc '))
> #        commonEnvironment.Prepend(LINKFLAGS = Split('-arch i386 - 
> arch ppc '))
>        commonEnvironment.Prepend(CCFLAGS = Split('-O3 -arch i386 '))
>        commonEnvironment.Prepend(CXXFLAGS = Split('-O3 -arch i386 '))
>        commonEnvironment.Prepend(LINKFLAGS = Split('-arch i386 '))
>
>
> I'm guessing Snow Leopard doesn't like trying to compile things for
> ppc.  So I now compiling a version of Csound that works with
> Processing. The next step is to compile Csound doubles and making it
> work with Processing.  Hopefully I'll be able to release a Doubles
> version of Csoundo sometime tomorrow.
>
> Best,
> Jake
> -- 
> The Csound Blog - http://csoundblog.com/
> Slipmat - http://slipmat.noisepages.com/
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-09-02 20:23
FromAndres Cabrera
Subject[Csnd] Re: Re: Re: Building 32-bit Csound on Snow Leopard, problems with sndfile
Hi,

Don't know about Csound, which is a tougher beast, but I build
QuteCsound universal on Snow Leopard...

Cheers,
Andrés

On Thu, Sep 2, 2010 at 7:40 PM, Jacob Joaquin  wrote:
> Got it working.  This is what I had to do in SConstruct on Snow Leopard.
>
>
>    if getPlatform() == 'darwin':
> #      if cpuType == 'universal':
> #        commonEnvironment.Prepend(CCFLAGS = Split('-O3 -arch i386
> -arch ppc '))
> #        commonEnvironment.Prepend(CXXFLAGS = Split('-O3 -arch i386
> -arch ppc '))
> #        commonEnvironment.Prepend(LINKFLAGS = Split('-arch i386 -arch ppc '))
>        commonEnvironment.Prepend(CCFLAGS = Split('-O3 -arch i386 '))
>        commonEnvironment.Prepend(CXXFLAGS = Split('-O3 -arch i386 '))
>        commonEnvironment.Prepend(LINKFLAGS = Split('-arch i386 '))
>
>
> I'm guessing Snow Leopard doesn't like trying to compile things for
> ppc.  So I now compiling a version of Csound that works with
> Processing. The next step is to compile Csound doubles and making it
> work with Processing.  Hopefully I'll be able to release a Doubles
> version of Csoundo sometime tomorrow.
>
> Best,
> Jake
> --
> The Csound Blog - http://csoundblog.com/
> Slipmat - http://slipmat.noisepages.com/
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>



-- 


Andrés


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2010-09-02 23:18
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: Building 32-bit Csound on Snow Leopard, problems with sndfile
No, what I think is happenning is that gcc4opt is not being passed to  
the config checks correctly. That message says that the config test  
was built with -arch i386 and linked against -arch x86_64.
Again, some SConstruct bug.

Victor


On 2 Sep 2010, at 17:54, Jacob Joaquin wrote:

> First, I recompiled libsndfile.dylib getting rid of -isysroot, and
> verified that the new file is still a universal binary.  Then I
> recompiled and the same issue popped up. I checked the config.log, and
> here's the relevant portion:
>
>
> gcc -o .sconf_temp/conftest_1 .sconf_temp/conftest_1.o -L. -L.
> -L/usr/local/lib -L. -L. -L/usr/local/lib -lsndfile
> ld: warning: in .sconf_temp/conftest_1.o, file was built for i386
> which is not the architecture being linked (x86_64)
> Undefined symbols:
>  "_main", referenced from:
>      start in crt1.10.6.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> scons: Configure: no
>
>
> My only guess is that I need to somehow specify to compile against
> i386 version inside the universal lib.
>
> And before I forget, thanks everyone for all your help so far. I don't
> think I'll make it through this process with you.
>
> Best,
> Jake
> -- 
> The Csound Blog - http://csoundblog.com/
> Slipmat - http://slipmat.noisepages.com/
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"