Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Sconstruct2 does not build csnd or CsoundAC on Windows

Date2008-04-16 09:28
Fromvictor
SubjectRe: [Cs-dev] Sconstruct2 does not build csnd or CsoundAC on Windows
This was because the -java flag had for some reason been removed. Fixed now
in CVS. It builds.

Victor
----- Original Message ----- 
From: "victor" 
To: "Developer discussions" 
Sent: Wednesday, April 16, 2008 9:01 AM
Subject: Re: [Cs-dev] Sconstruct2 does not build csnd or CsoundAC on Windows


> I've seen this before. This seems to be caused by swig being called to 
> build
> TCL wrappers instead of java (!)
>
> ----- Original Message ----- 
> From: "Michael Gogins" 
> To: "Developer discussions" 
> Sent: Wednesday, April 16, 2008 2:31 AM
> Subject: Re: [Cs-dev] Sconstruct2 does not build csnd or CsoundAC on 
> Windows
>
>
>> Having gotten past the problems with the _CsoundAC.pyd, I am now finding
>> TCL
>> symbols undefined in the Java interfaces shared library.
>>
>> To clarify my original intention in SConstruct, the basic idea is to 
>> build
>> everything into a shared or static csnd and CsoundAC libraries that is 
>> not
>> specific to any particular interface language. That includes csound.hpp,
>> CppSound, CsoundFile, the associated utility classes (-lcsnd), and all 
>> the
>> CsoundAC C++ classes (-lCsoundAC). This is all pure C or C++ code.
>>
>> Then, each interface language can have its own shared library on top of
>> that, bringing in its own particular SWIG-generated wrapper file. That
>> way,
>> each language is encapsulated inside of its own shared library.
>>
>> Regards,
>> Mike
>>
>>
>> ----- Original Message ----- 
>> From: "Michael Gogins" 
>> To: "Developer discussions" 
>> Sent: Tuesday, April 15, 2008 9:05 PM
>> Subject: Re: [Cs-dev] Sconstruct2 does not build csnd or CsoundAC on
>> Windows
>>
>>
>>> There is still a problem with multiple definitions. Perhaps you are not
>>> building all the parts that go into the installer. This is my build
>>> script
>>> with all the options required to build all the parts for the installer:
>>>
>>> #!/bin/sh
>>>
>>> scons custom=custom-mingw.py usePortMIDI=1 useBufferOverflowLibrary=1
>>> useJack=0 buildCsoundVST=1 buildvst4cs=1 buildInterfaces=1
>>> buildCsoundAC=1
>>> buildJavaWrapper=1 useOSC=1 buildPythonOpcodes=1 buildLoris=0
>>> buildStkOpcodes=1 buildWinsound=1 noFLTKThreads=0 buildPDClass=1
>>> buildVirtual=1 buildCsound5GUI=1 buildTclcsound=1 buildLua=1 useDouble=1
>>> dynamicCsoundLibrary=1 buildCSEditor=1 gcc4opt=nocona buildRelease=0
>>> bufferoverflowu=1 noDebug=0 $1 $2 $3 $4
>>>
>>> The problems with link line start as shown below.
>>>
>>> Regards,
>>> Mike
>>>
>>> g++ --subsystem:windows -shared -mwindows -mno-cygwin -Wl,--enable-auto-import
>>> -Wl,--enable-runtime-pseudo-reloc -o _CsoundAC.pyd fr
>>> ontends\CsoundAC\CsoundAC_wrap.o -L. -L. -LD:\usr\local\lib -L. -L. -LU:\libsndfile-1_0_17
>>> -LU:\portaudio\build\msvc\Win32\Release -
>>> LU:\portmidi\pm_win -LU:\portmidi\porttime\Release -LU:\portmidi\pm_win\Release
>>> -LU:\fltk-mingw\lib -LU:\zlib -LU:\libpng-1.2.24\.li
>>> bs -LU:\Python25\libs -LU:\LuaJIT-1.1.4 -LU:\Tcl\lib -LU:\fluidsynth\winbuild
>>> -LU:\dxsdk\Lib\x86 -LU:\liblo -LU:\pthreads\Pre-built.
>>> 2\lib -LU:\pd\bin -lCsoundAC -lpython25 -lfltk -lfltk_images -lfltk_png  
>>> -lfltk_jpeg
>>> -lfltk_z -lsndfile -lcsound64 _csnd.pyd lib_csnd
>>> .a
>>> _csnd.def -lpython25 -lsndfile -lportaudio -lportmidi -lfltk -llo -lpng  
>>> -lstdc++
>>> -lsupc++ -ladvapi32 -lcomctl32 -lcomdlg32 -lglu3
>>> 2 -lkernel32 -lmsvcrt -lodbc32 -lodbccp32 -lole32 -loleaut32 -lshell32 -luser32
>>> -luuid -lwinmm -lwinspool -lws2_32 -lwsock32 -ladvap
>>> i32 -lcomctl32 -lcomdlg32 -lglu32 -lkernel32 -lodbc32 -lodbccp32 -lole32
>>> -loleaut32
>>> -lshell32 -luser32 -luuid -lwinmm -lwinspool -lw
>>> s2_32 -lwsock32 -lbufferoverflowu -Wl,--out-implib,lib_CsoundAC.a -Wl,--output-def,_CsoundAC.def
>>> Creating library file: lib_CsoundAC.a
>>> _csnd.pyd:iostream-inst.cc:(.text+0x60): multiple definition of
>>> `DllMainCRTStartup@12'
>>> d:/utah/mingw/bin/../lib/gcc/mingw32/4.2.1-dw2/../../../dllcrt2.o:dllcrt1.c:(.text+0x60):
>>> first defined here
>>> _csnd.pyd:iostream-inst.cc:(.text+0x110): multiple definition of 
>>> `atexit'
>>> d:/utah/mingw/bin/../lib/gcc/mingw32/4.2.1-dw2/../../../dllcrt2.o:dllcrt1.c:(.text+0x110):
>>> first defined here
>>> _csnd.pyd:iostream-inst.cc:(.text+0x140): multiple definition of
>>> `_onexit'
>>> d:/utah/mingw/bin/../lib/gcc/mingw32/4.2.1-dw2/../../../dllcrt2.o:dllcrt1.c:(.text+0x140):
>>> first defined here
>>> _csnd.pyd:iostream-inst.cc:(.text+0x170): multiple definition of
>>> `__gcc_register_frame'
>>> d:/utah/mingw/bin/../lib/gcc/mingw32/4.2.1-dw2/crtbegin.o:cygming-crtbegin.c:(.text+0x0):
>>> first defined here
>>> _csnd.pyd:iostream-inst.cc:(.text+0x1e0): multiple definition of
>>> `__gcc_deregister_frame'
>>> d:/utah/mingw/bin/../lib/gcc/mingw32/4.2.1-dw2/crtbegin.o:cygming-crtbegin.c:(.text+0x70):
>>> first defined here
>>> _csnd.pyd:iostream-inst.cc:(.text+0x230): multiple definition of 
>>> `__main'
>>> d:/utah/mingw/bin/../lib/gcc/mingw32/4.2.1-dw2/crtbegin.o:cygming-crtbegin.c:(.text+0xc0):
>>> first defined here
>>> _csnd.pyd:interfaces/python_interface_wrap.cc:2613: multiple definition
>>> of
>>> `Swig::GCItem::get_own() const'
>>> frontends\CsoundAC\CsoundAC_wrap.o:frontends/CsoundAC/CsoundAC_wrap.cc:2613:
>>> first defined here
>>> _csnd.pyd:interfaces/python_interface_wrap.cc:2917: multiple definition
>>> of
>>> `Swig::Director::swig_get_inner(char const*) const'
>>> frontends\CsoundAC\CsoundAC_wrap.o:frontends/CsoundAC/CsoundAC_wrap.cc:2917:
>>> first defined here
>>> _csnd.pyd:interfaces/python_interface_wrap.cc:2920: multiple definition
>>> of
>>> `Swig::Director::swig_set_inner(char const*, bool) const'
>>>
>>> frontends\CsoundAC\CsoundAC_wrap.o:frontends/CsoundAC/CsoundAC_wrap.cc:2920:
>>> first defined here
>>> _csnd.pyd:d:\utah\home\mkg\projects\csound-mingw-release/H/csound.hpp:72:
>>> multiple definition of `Csound::GetCsound()'
>>> frontends\CsoundAC\CsoundAC_wrap.o:d:\utah\home\mkg\projects\csound-mingw-release/H/csound.hpp:72:
>>> first defined here
>>> _csnd.pyd:interfaces/python_interface_wrap.cc:4699: multiple definition
>>> of
>>> `swig::PySwigIteratorOpen_T<__gnu_cxx::__normal_iterator<
>>> double*, std::vector > >, double,
>>> swig::from_oper >::incr(unsigned int)'
>>> frontends\CsoundAC\CsoundAC_wrap.o:frontends/CsoundAC/CsoundAC_wrap.cc:4057:
>>> first defined here
>>> _csnd.pyd:interfaces/python_interface_wrap.cc:4707: multiple definition
>>> of
>>> `swig::PySwigIteratorOpen_T<__gnu_cxx::__normal_iterator<
>>> double*, std::vector > >, double,
>>> swig::from_oper >::decr(unsigned int)'
>>> frontends\CsoundAC\CsoundAC_wrap.o:frontends/CsoundAC/CsoundAC_wrap.cc:4065:
>>> first defined here
>>> _csnd.pyd:interfaces/python_interface_wrap.cc:4699: multiple definition
>>> of
>>> `swig::PySwigIteratorOpen_T>> xx::__normal_iterator>> std::allocator > > >, double, swig::from_oper
>>>  >::incr(unsig
>>> ned int)'
>>>
>>>
>>>
>>>
>>> ----- Original Message ----- 
>>> From: "victor" 
>>> To: "Developer discussions" 
>>> Sent: Tuesday, April 15, 2008 7:19 PM
>>> Subject: Re: [Cs-dev] Sconstruct2 does not build csnd or CsoundAC on
>>> Windows
>>>
>>>
>>>> Well, to be fair, I did make one change in SConstruct (line 2107):
>>>>
>>>>        if getPlatform() != 'win32':
>>>>         acEnvironment.Prepend(LIBS = csndModule)
>>>>        else:  acEnvironment.Prepend(LIBS = 'csnd')
>>>>
>>>> I did not think it made any difference, but on reverting, I got the
>>>> same errors as you. The linker was trying to link to _csnd.pyd
>>>> and failing miserably. Now it seems to be correct (linking to 
>>>> csnd.dll).
>>>>
>>>> I am committing the changes as we speak
>>>>
>>>> Victor
>>>>
>>>> ----- Original Message ----- 
>>>> From: "Michael Gogins" 
>>>> To: "Developer discussions" 
>>>> Sent: Tuesday, April 15, 2008 11:35 PM
>>>> Subject: Re: [Cs-dev] Sconstruct2 does not build csnd or CsoundAC on
>>>> Windows
>>>>
>>>>
>>>>> Yes, as I said before, I tried building with SConstruct and it failed
>>>>> in
>>>>> the
>>>>> same way. I am going to try it again right now, as thoroughly as I 
>>>>> can.
>>>>> It
>>>>> doesn't make sense.
>>>>>
>>>>> Regards,
>>>>> Mike
>>>>> ----- Original Message ----- 
>>>>> From: "victor" 
>>>>> To: "Developer discussions" 
>>>>> Sent: Tuesday, April 15, 2008 6:01 PM
>>>>> Subject: Re: [Cs-dev] Sconstruct2 does not build csnd or CsoundAC on
>>>>> Windows
>>>>>
>>>>>
>>>>>> Did you try building with SConstruct? I can build CsoundAC here
>>>>>> without
>>>>>> any
>>>>>> problems
>>>>>> (on Windows).
>>>>>>
>>>>>> Victor
>>>>>>
>>>>>> ----- Original Message ----- 
>>>>>> From: "Michael Gogins" 
>>>>>> To: "Developer discussions" 
>>>>>> Sent: Tuesday, April 15, 2008 3:26 AM
>>>>>> Subject: [Cs-dev] Sconstruct2 does not build csnd or CsoundAC on
>>>>>> Windows
>>>>>>
>>>>>>
>>>>>>> _csnd.pyd fails to link:
>>>>>>>
>>>>>>> g++ -shared -mwindows -mno-cygwin -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc
>>>>>>> -module -Wl,--add-stdcall-alias -o _csn
>>>>>>> d.pyd
>>>>>>> interfaces\python_interface_wrap.o -L. -L. -LD:\usr\local\lib -L. -L.
>>>>>>> -LU:\libsndfile-1_0_17
>>>>>>> -LU:\portaudio\build\msvc\Win32\R
>>>>>>> elease -LU:\portmidi\pm_win -LU:\portmidi\porttime\Release -LU:\portmidi\pm_win\Release
>>>>>>> -LU:\fltk-mingw\lib -LU:\zlib -LU:\libpng-1.
>>>>>>> 2.24\.libs -LU:\Python25\libs -LU:\LuaJIT-1.1.4 -LU:\Tcl\lib -LU:\fluidsynth\winbuild
>>>>>>> -LU:\dxsdk\Lib\x86 -LU:\liblo -LU:\pthreads\Pr
>>>>>>> e-built.2\lib -LU:\pd\bin -lpython25 -lstdc++ -lcsound64 -lsndfile -lportaudio
>>>>>>> -lportmidi -lfltk -llo -lsndfile -ladvapi32 -lcomctl3
>>>>>>> 2 -lcomdlg32 -lglu32 -lkernel32 -lmsvcrt -lodbc32 -lodbccp32 -lole32
>>>>>>> -loleaut32
>>>>>>> -lshell32 -luser32 -luuid -lwinmm -lwinspool -lws2_3
>>>>>>> 2 -lwsock32 -ladvapi32 -lcomctl32 -lcomdlg32 -lglu32 -lkernel32 -lodbc32
>>>>>>> -lodbccp32
>>>>>>> -lole32 -loleaut32 -lshell32 -luser32 -luuid -lw
>>>>>>> inmm -lwinspool -lws2_32 -lwsock32 -lbufferoverflowu -lwinmm 
>>>>>>> csnd.dll
>>>>>>> libcsnd.a csnd.def -Wl,--out-implib,lib_csnd.a -Wl,--output-de
>>>>>>> f,_csnd.def
>>>>>>> Creating library file: lib_csnd.a
>>>>>>> d000000.o:(.idata$2+0x0): multiple definition of `_head_csnd_dll'
>>>>>>> libcsnd.a(d000000.o):(.idata$2+0x0): first defined here
>>>>>>> d000160.o:(.idata$7+0x0): multiple definition of `csnd_dll_iname'
>>>>>>> libcsnd.a(d000406.o):(.idata$7+0x0): first defined here
>>>>>>> Cannot export _ZTV10CsoundFile: symbol not found
>>>>>>> Cannot export _ZTV8CppSound: symbol not found
>>>>>>> collect2: ld returned 1 exit status
>>>>>>> scons: *** [_csnd.pyd] Error 1
>>>>>>> scons: building terminated because of errors.
>>>>>>>
>>>>>>> If I try to fix that by making csnd a static library, then the 
>>>>>>> Python
>>>>>>> message callback in csnd, which brings in Python, is linked with
>>>>>>> CsoundVST.
>>>>>>> However, CsoundVST must never link with Python.
>>>>>>>
>>>>>>> If I try to fix that, then there are multiple Python import symbols
>>>>>>> in
>>>>>>> the
>>>>>>> CsoundAC link.
>>>>>>>
>>>>>>> There may be more problems, but that is where I quit.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Mike
>>>>>>>
>>>>>>>
>>>>>>> -------------------------------------------------------------------------
>>>>>>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>>>>>>> Don't miss this year's exciting event. There's still time to save
>>>>>>> $100.
>>>>>>> Use priority code J8TL2D2.
>>>>>>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>>>>>>> _______________________________________________
>>>>>>> Csound-devel mailing list
>>>>>>> Csound-devel@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>
>>>>>>
>>>>>> -------------------------------------------------------------------------
>>>>>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>>>>>> Don't miss this year's exciting event. There's still time to save
>>>>>> $100.
>>>>>> Use priority code J8TL2D2.
>>>>>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>>
>>>>> -------------------------------------------------------------------------
>>>>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>>>>> Don't miss this year's exciting event. There's still time to save 
>>>>> $100.
>>>>> Use priority code J8TL2D2.
>>>>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>>
>>>> -------------------------------------------------------------------------
>>>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>>>> Don't miss this year's exciting event. There's still time to save $100.
>>>> Use priority code J8TL2D2.
>>>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>>> Don't miss this year's exciting event. There's still time to save $100.
>>> Use priority code J8TL2D2.
>>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>> Don't miss this year's exciting event. There's still time to save $100.
>> Use priority code J8TL2D2.
>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net