Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1304 LIBS = STAF

open
nobody
None
5
2009-11-02
2009-11-02
asystejs
No

Most of the nested makefile.staf files use
LIBS = STAF
instead of
LIBS = $(LIB_STAF)

Every attempt at linking fails because it sets -lSTAF when the name is realy libSTAF or libSTAF.so

Discussion

1 2 > >> (Page 1 of 2)
  • Sharon Lucas
    Sharon Lucas
    2009-11-02

    We build STAF every day for all supported platforms using the make files that are checked into CVS (and provided in the STAFxxx-src.zip/tar files), so I'm not sure what the problem is that you're experiencing. What are the exact steps that you are using to build STAF?

     
  • Charles Rankin
    Charles Rankin
    2009-11-02

    Note, unless you are doing very specific things when building on unix, you don't want to put the prefix or suffix. It is the compilers/linkers responsibility to figure out the appropriate prefixes/suffixes.

     
  • asystejs
    asystejs
    2009-11-02

    The steps are

    export BUILD_TYPE=release
    export OS_NAME=nsk
    export PROJECTS='staf conprov_tcp'
    export CC_NAME=cpp
    export STAF_USE_SSL=
    export STAF_USE_IPV6=

    make

    ---------------------------------

    I had to change all occurances of
    LIBS = STAF
    to
    LIBS = $(LIB_STAF)

     
  • asystejs
    asystejs
    2009-11-02

    Unfortunately this isn't Unix, its a Posix environment running under Nonstop Kernel.

    If I don't set a lib prefix or suffix then both the main executable
    and the staf lib end up being named STAF and the the OS loader resolves
    the libnme STAF in the liblist to the main exeecutable named STAF and fails the process creation

     
  • Charles Rankin
    Charles Rankin
    2009-11-02

    Could you post the contents of your build/makefile.nsk and build/makefile.cpp

     
  • Sharon Lucas
    Sharon Lucas
    2009-11-02

    Did you create a build/makefile.nsk file in the source tree? What are its contents?

    Are you setting the OS_SHARED_LIB_PREFIX and OS_SHARED_LIB_SUFFIX variables in your makefile.nsk file? You probably shouldn't be as the defaults are lib for the prefix and dll for the suffix as set in the master makefile.

     
  • asystejs
    asystejs
    2009-11-02

     
    Attachments
  • asystejs
    asystejs
    2009-11-02

     
    Attachments
  • asystejs
    asystejs
    2009-11-03

    When the env vars DLL/LIB_STAF/LIB_STAF_FP are created via

    DLL = $(OS_SHARED_LIB_PREFIX)Name$(OS_SHARED_LIB_SUFFIX)
    LIB_STAF = $(subst Name,STAF,$(DLL))
    LIB_STAF_FP = $(REL)/lib/$(LIB_STAF)

    if the prefix and suffix are empty

    LIBS = STAF is equivalent to LIBS = $(LIB_STAF)

    Using $(LIB_STAF) everywhere enables the ability to set a name prefix/suffix
    on a platform where the explicit name is required.

     
  • Sharon Lucas
    Sharon Lucas
    2009-11-04

    In your build/makefile.nsk, why are you setting OS_SHARED_LIB_PREFIX and OS_SHARED_LIB_SUFFIX ? The STAF master makefile already defaults them to lib and .so, respectively.

    In your build/makefile.cpp file:
    - Why did you comment out how CC_SHAREDLIBNAMEFLAGS should be set and provide your own setting?
    - Why did you comment out the line after comment "We must link with a shread library via the corresponding definition side-deck" and why did you comment out the last line that assigns MOVE_SIDE_DECK ?

     
1 2 > >> (Page 1 of 2)