| Thanks for the information -- I'll check out the DC++ SConstruct later.
I have been thinking for some time that our SConstruct is, frankly, a bit untidy. Many worthy persons who are not Python programmers have worked on it, so it works, but there is a lot of duplicate code and different ways of doing things. Also, I have avoided taking it upon myself to clean things up for fear of messing up other people's contributions, plus I don't know anything at all about building on OS X.
Best,
Mike
-----Original Message-----
>From: Steven Yi
>Sent: Feb 26, 2008 4:53 PM
>To: Michael Gogins , Developer discussions
>Subject: Re: [Cs-dev] Broken Build when using Flex/Bison
>
>Hi Michael,
>
>I haven't tried default as a tool. One thing I wanted to note was
>that I found this Scontruct file used for DC++:
>
>http://dcplusplus.svn.sourceforge.net/viewvc/dcplusplus/dcplusplus/trunk/SConstruct?view=markup
>
>There's some practices there that I think we might want to implement,
>like using BoolOptions so that we don't have to test against string
>"1" rather than just checking True. It also looks like it support
>mingw and msvc.
>
>steven
>
>
>On Tue, Feb 26, 2008 at 10:17 AM, Michael Gogins wrote:
>> Thanks for the info. The problem I was trying to solve is this. SCons contains a built-in "tool detector" which, unfortunately, doesn't only look at paths and environment variables. On Windows, it also (I think) looks at the Windows registry. (I could be wrong about this...) Since I have 3 C++ compilers installed and use them all, this is no good.
>>
>> At any rate, by passing the tools to SCons programmatically, I defeat the tool auto-detection.
>>
>> We should look at the SCons source code to figure out a smarter way of doing this. Looking at the code could tell us how to turn a tool "off", which would get rid of cl in the MinGW build or g++ in the msvc build. Or, looking at the code could tell us just how to programatically set up the lex/yacc tools.
>>
>> Did you try just adding 'default' as a tool?...
>>
>> Regards,
>>
>> Mike
>>
>> -----Original Message-----
>> >From: Steven Yi
>>
>> >Sent: Feb 26, 2008 12:34 PM
>> >To: Developer discussions
>>
>>
>> >Subject: Re: [Cs-dev] Broken Build when using Flex/Bison
>> >
>> >Hi Michael,
>> >
>> >As Andres noted, adding lex and yacc (which, btw, is what flex and
>> >bison are detected as when I remove the hardcoding of the tools for
>> >MinGW) does not work. My guess is that more than just a Tool need be
>> >added, as Scons complains it doesn't know what to do with the .l file,
>> >not that a tool couldn't be found.
>> >
>> >steven
>> >
>> >
>> >
>> >On Tue, Feb 26, 2008 at 5:48 AM, Andres Cabrera wrote:
>> >> I added the tools 'lex' and 'yacc' which are their names on my system
>> >> but that didn't seem to do it...
>> >>
>> >> Cheers,
>> >> Andrés
>> >>
>> >>
>> >>
>> >>
>> >> On Tue, Feb 26, 2008 at 8:16 AM, Michael Gogins wrote:
>> >> > This is where you should simply be able to add the tools to the list. But you have to know what their real names are. That, in turn, will be apparent from when you comment out these lines and SConstruct prints its built up list of tools for the environment.
>> >> >
>> >> >
>> >> > Hope this helps,
>> >> > Mike
>> >> >
>> >> > -----Original Message-----
>> >> > >From: Steven Yi
>> >> >
>> >> > >Sent: Feb 26, 2008 2:16 AM
>> >> > >To: Developer discussions
>> >> >
>> >> >
>> >> > >Subject: Re: [Cs-dev] Broken Build when using Flex/Bison
>> >> > >
>> >> > >Hi Andres,
>> >> > >
>> >> > >Unfortunately the changes do not work and it is still broken regarding
>> >> > >flex and bison. Commenting out:
>> >> > >
>> >> > >commonEnvironment = Environment(tools = ['mingw', 'swig', 'javac', 'jar'])
>> >> > >
>> >> > >Is the only way I've been able to get things to compile. Moving the
>> >> > >addition of the lex and yacc Tool() earlier does not solve the problem
>> >> > >and Scons still gets confused about what to do with .l files. I don't
>> >> > >know what the solution is though.
>> >> > >
>> >> > >steven
>> >> > >
>> >> > >On Mon, Feb 25, 2008 at 6:20 PM, Andres Cabrera wrote:
>> >> > >> Hi,
>> >> > >> I've commited some small changes to SConstruct, and I've added
>> >> > >> hardcoded 'lex' and 'yacc' to the tools when building the new parser
>> >> > >> on windows. I can't test here since I don't have windows, but maybe
>> >> > >> this addition is enough?
>> >> > >>
>> >> > >> Cheers,
>> >> > >> Andrés
>> >> > >>
>> >> > >>
>> >> > >>
>> >> > >>
>> >> > >> On Mon, Feb 25, 2008 at 5:52 PM, Michael Gogins wrote:
>> >> > >> > In order to have MSVC and MinGW (and the Intel compiler) co-exist in SConstruct, I have changed it to (1) detect user's choice of tools either from environment or from option (withMSVC etc.), (2) re-construct the commonEnvironment from scratch, (3) add specific tools suitable to the user's choice to the commonEnvironment programmatically.
>> >> > >> >
>> >> > >> > I think the best thing is to add bison and and flex to the tools in the appropriate platform cases.
>> >> > >> >
>> >> > >> > Hope this helps,
>> >> > >> > Mike
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > -----Original Message-----
>> >> > >> > >From: Steven Yi
>> >> > >> > >Sent: Feb 25, 2008 4:32 PM
>> >> > >> > >To: Developer discussions
>> >> > >> > >Subject: [Cs-dev] Broken Build when using Flex/Bison
>> >> > >> > >
>> >> > >> > >Hi All,
>> >> > >> > >
>> >> > >> > >Recent changes to SConstruct broke detection of flex/bison (as far as
>> >> > >> > >I can tell that is the problem). During configuration, Scons shows:
>> >> > >> > >
>> >> > >> > >SCons tools on this platform: ['mingw', 'gcc', 'g++', 'gnulink',
>> >> > >> > >'ar', 'gas', 'm4', 'swig', 'javac', 'jar', 'mingw', 'gcc', 'g++',
>> >> > >> > >'gnulink', 'ar', 'gas', 'm4']
>> >> > >> > >
>> >> > >> > >
>> >> > >> > >which show the mingw tool set twice and no detection of flex/bison.
>> >> > >> > >Because of this I get:
>> >> > >> > >
>> >> > >> > >scons: *** While building `['Engine\\csound_orclex.c']' from
>> >> > >> > >`['Engine\\csound_orc.l']': Don't know how to build from a source file
>> >> > >> > >with suffix `.l'. Expected a suffix in this list: ['.i'].
>> >> > >> > >
>> >> > >> > >
>> >> > >> > >I think this is all due to the change to hardcode the tools on the
>> >> > >> > >platforms for MinGW?
>> >> > >> > >
>> >> > >> > >(BTW: For anyone on Windows, the version of flex and bison I am using
>> >> > >> > >are from http://gnuwin32.sourceforge.net/)
>> >> > >> > >
>> >> > >> > >Thanks!
>> >> > >> > >steven
>> >> > >> > >
>> >> > >> > >-------------------------------------------------------------------------
>> >> > >> > >This SF.net email is sponsored by: Microsoft
>> >> > >> > >Defy all challenges. Microsoft(R) Visual Studio 2008.
>> >> > >> > >http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> >> > >> > >_______________________________________________
>> >> > >> > >Csound-devel mailing list
>> >> > >> > >Csound-devel@lists.sourceforge.net
>> >> > >> > >https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > -------------------------------------------------------------------------
>> >> > >> > This SF.net email is sponsored by: Microsoft
>> >> > >> > Defy all challenges. Microsoft(R) Visual Studio 2008.
>> >> > >> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> >> > >> > _______________________________________________
>> >> > >> > Csound-devel mailing list
>> >> > >> > Csound-devel@lists.sourceforge.net
>> >> > >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> > >> >
>> >> > >>
>> >> > >> -------------------------------------------------------------------------
>> >> > >> This SF.net email is sponsored by: Microsoft
>> >> > >> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> >> > >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> >> > >> _______________________________________________
>> >> > >> Csound-devel mailing list
>> >> > >> Csound-devel@lists.sourceforge.net
>> >> > >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> > >>
>> >> > >
>> >> > >-------------------------------------------------------------------------
>> >> > >This SF.net email is sponsored by: Microsoft
>> >> > >Defy all challenges. Microsoft(R) Visual Studio 2008.
>> >> > >http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> >> > >_______________________________________________
>> >> > >Csound-devel mailing list
>> >> > >Csound-devel@lists.sourceforge.net
>> >> > >https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > -------------------------------------------------------------------------
>> >> > This SF.net email is sponsored by: Microsoft
>> >> > Defy all challenges. Microsoft(R) Visual Studio 2008.
>> >> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> >> > _______________________________________________
>> >> > Csound-devel mailing list
>> >> > Csound-devel@lists.sourceforge.net
>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >
>> >>
>> >> -------------------------------------------------------------------------
>> >> This SF.net email is sponsored by: Microsoft
>> >> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >-------------------------------------------------------------------------
>> >This SF.net email is sponsored by: Microsoft
>> >Defy all challenges. Microsoft(R) Visual Studio 2008.
>> >http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> >_______________________________________________
>> >Csound-devel mailing list
>> >Csound-devel@lists.sourceforge.net
>> >https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csou |