Coder Social home page Coder Social logo

Comments (5)

bdbaddog avatar bdbaddog commented on May 24, 2024

Nope.. it should detect the dependency without Requires..

from scons-examples.

bdbaddog avatar bdbaddog commented on May 24, 2024

@ThakeeNathees - what if you don't name the lib lib but say abc ?

from scons-examples.

bdbaddog avatar bdbaddog commented on May 24, 2024

Here's the output I get when I name the shared library lib..

$ python ~/devel/scons/git/as_scons/scripts/scons.py
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o app.o -c app.c
gcc -o lib.os -c -fPIC lib.c
gcc -o lib.so  -shared   lib.os $( -L. $)
gcc -o app app.o -L.
app.o: In function `main':
app.c:(.text+0xf): undefined reference to `add'
collect2: error: ld returned 1 exit status
scons: *** [app] Error 1
scons: building terminated because of errors.

That's because SCons does some magic in removing the SHLIBPREFIX from the list libs before recreating and ends up removing it all together.

Here's the output if I name the library abc

$ python ~/devel/scons/git/as_scons/scripts/scons.py
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o libabc.so  -shared   lib.os $( -L. $)
gcc -o app app.o -L. -labc
scons: done building targets.

And if I name xyz

$ python ~/devel/scons/git/as_scons/scripts/scons.py
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o libxyz.so  -shared   lib.os $( -L. $)
gcc -o app app.o -L. -lxyz
scons: done building targets.

So there's nothing wrong with the example..

Just don't name your lib lib..
For further discussion come to the users mailing list, IRC channel, or preferably the discord server

from scons-examples.

bdbaddog avatar bdbaddog commented on May 24, 2024

@ThakeeNathees - can you file an issue for this on https://github.com/SCons/scons/issues. You can note that @bdbaddog said to file it.

The issue is libname = 'lib'...

from scons-examples.

mwichmann avatar mwichmann commented on May 24, 2024

or more verbosely, if the lib name is the same as $SHLIBPREFIX then the name will be sliced down to an empty string. Which, umm, breaks stuff...

from scons-examples.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.