[Scons-users] Building versioned shared library fails when using MinGW
Bill Deegan
bill at baddogconsulting.com
Sat Nov 26 23:07:52 EST 2016
What's the proper naming for a versioned shared library under mingw?
Currently for your example it's trying to create : libfoo.dylib.2.4
-Bill
On Sat, Nov 26, 2016 at 4:34 PM, Ray Speth <speth at darkmatter.mit.edu> wrote:
> If I name the target 'foo.dll', then the error becomes:
>
> scons: *** Multiple ways to build the same target were specified for:
> foo.dll
>
> If I change the name to 'foo.bar' then the error references the name
> 'foo.bar'.
>
> Adding either '--deub=presub' or '--tree=prune' does not provide any
> additional information. The output from running 'scons --debug-stacktrace'
> has been added to the previously-linked Gist.
>
> I would also note that debugging this does not necessarily require having
> MinGW installed. I am able to replicate this bug on an Ubuntu system as
> well, with the exception that in the "working" case you end up calling the
> system GCC with some flags that it doesn't like and compilation fails, as
> expected.
>
> Regards,
> Ray
>
> On 11/24/2016 11:05 PM, Bill Deegan wrote:
>
>> What happens when you change the target for SharedLibrary to 'foo.dll' ?
>>
>> On Tue, Nov 22, 2016 at 7:57 PM, Ray Speth <speth at darkmatter.mit.edu
>> <mailto:speth at darkmatter.mit.edu>> wrote:
>>
>> Bill,
>>
>> Adding the --tree=prune and --deub=presub options don't change the
>> output. The value of CCCOM is '$CC -o $TARGET -c $CFLAGS $CCFLAGS
>> $_CCCOMCOM $SOURCES'. According to env.subst, this works out to 'gcc
>> -o -c'.
>>
>> The output from adding the --debug=stacktrace option are posted at
>> https://gist.github.com/speth/6f022116c3a1273952afe8167c6388ae
>> <https://gist.github.com/speth/6f022116c3a1273952afe8167c6388ae>,
>> along with the full output of 'print env.Dump()'.
>>
>> Regards,
>> Ray
>>
>> On 11/20/2016 6:43 PM, Bill Deegan wrote:
>>
>> Ray,
>>
>> I don't have mingw installed on a system I have readily
>> available today.
>> Can you pastebin the output for the following:
>>
>> scons --tree=prune
>> scons --deub=presub
>>
>> Add:
>>
>> print env.Dump('CCCOM')
>>
>> To you Sconstruct and run scons and copy that output as well.
>>
>> Thanks,
>>
>> Bill
>>
>>
>>
>> On Sat, Nov 19, 2016 at 5:59 PM, Ray Speth
>> <speth at darkmatter.mit.edu <mailto:speth at darkmatter.mit.edu>
>> <mailto:speth at darkmatter.mit.edu
>> <mailto:speth at darkmatter.mit.edu>>> wrote:
>>
>>
>> Hi,
>>
>> I have encountered an apparent bug when trying to build
>> versioned
>>
>> shared libraries with MinGW. A minimal SConstruct:
>>
>>
>> env = Environment(tools=['mingw'])
>> lib = env.SharedLibrary('foo', ['foo.cpp'],
>> SHLIBVERSION='2.4')
>> env.AlwaysBuild(lib)
>>
>> generates the following output:
>>
>> scons: Reading SConscript files ...
>> scons: *** A shared library should have exactly one
>> target with the
>> suffix: .dll
>> File "path\to\SConstruct", line 2, in <module>
>>
>> I have tested this with SCons 2.4.1, 2.5.0, and 2.5.1, with
>> the same
>>
>> results.
>>
>>
>> Regards,
>> Ray
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org <mailto:Scons-users at scons.org>
>> <mailto:Scons-users at scons.org <mailto:Scons-users at scons.org>>
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>> <https://pairlist4.pair.net/mailman/listinfo/scons-users>
>>
>>
>>
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org <mailto:Scons-users at scons.org>
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>> <https://pairlist4.pair.net/mailman/listinfo/scons-users>
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org <mailto:Scons-users at scons.org>
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>> <https://pairlist4.pair.net/mailman/listinfo/scons-users>
>>
>>
>>
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20161126/8b329e54/attachment.html>
More information about the Scons-users
mailing list