#69 MSVC libset reported to include extra files

closed-fixed
cpptasks (103)
5
2004-04-21
2004-04-16
Curt Arnold
No

In http://sourceforge.net/forum/forum.php?
thread_id=1059410&forum_id=113701, saber850
reported that extra files were being included in a link
step when using MS or similar linkers. Have not been
able to reproduce the problem. I'm opening this defect
to add the test case and if saber is able to reproduce
the problem will address it here.

Discussion

  • Curt Arnold

    Curt Arnold - 2004-04-16

    Additional test in TestLibrarySet.java

     
  • Curt Arnold

    Curt Arnold - 2004-04-17

    Logged In: YES
    user_id=27193

    Oops, broke the build.

     
  • Curt Arnold

    Curt Arnold - 2004-04-17

    Change FileCollector to MockFileCollector

     
  • saber850

    saber850 - 2004-04-19

    Logged In: YES
    user_id=1016209

    I attempted to strip my setup for a simple test case but
    (you guessed it) the problem is gone.
    I have a bunch of work to do in this area so hopefully it
    will resurface and I can provide a test case.

     
  • Curt Arnold

    Curt Arnold - 2004-04-20
    • status: open --> closed-works-for-me
     
  • saber850

    saber850 - 2004-04-20

    Logged In: YES
    user_id=1016209

    This entry has been closed; can I attach files to it?

     
  • Curt Arnold

    Curt Arnold - 2004-04-20
    • status: closed-works-for-me --> open-works-for-me
     
  • saber850

    saber850 - 2004-04-20

    Logged In: YES
    user_id=1016209

    Oops, I opened another bug entry (I didn't know if you could
    re-open this one).
    Please defer to bug entry # 938853.

     
  • Curt Arnold

    Curt Arnold - 2004-04-21

    Logged In: YES
    user_id=27193

    The problem was actually occurred when creating a static
    library using a librarian and either libset or syslibsets where
    specified. Since libset and syslibsets are meaningless to most
    if not all librarians, getLibraryPattern() returned an zero-
    length array. Unfortunately, LibrarySet did not take this as a
    signal to skip collecting files resulting in attempting to add all
    files in the specified directory to the static library.

     
  • Curt Arnold

    Curt Arnold - 2004-04-21
    • status: open-works-for-me --> closed-fixed
     
  • saber850

    saber850 - 2004-04-21

    Logged In: YES
    user_id=1016209

    So what was the final resolution here (w/ regard to
    implementation)--how/what was fixed?
    Am I incorrect in using <[sys]libset> elements to specify
    libraries to be included in the generated library?

     
  • Curt Arnold

    Curt Arnold - 2004-04-21

    Logged In: YES
    user_id=27193

    libset and syslibsets are significant for shared libraries where
    the object files are linked into an executable file and
    references to the libraries are resolved. When using the
    created shared library in another link step, the libraries
    specified in building the created shared library are not
    necessary unless other object files in the new link step need
    them.

    libsets and syslibsets are not significant for static libraries
    where the object files are placed in an archive (similar to a
    zip file) and references are not resolved. If a static library is
    used in another link step, any libraries needed to resolve
    references in object files in the static library will need to be
    specified.

    If you have an object file foo.o that references a symbol in
    libbar.so that you use to build helloworld. If you were
    building a shared library, you would need to specify <libset
    libs="bar"/> on the shared library (libfoo.so) creation step,
    but not on the executable creation step. If you were building
    a static library, <libset libs="bar"/> is insignificant on the
    static library creation step (libfoo.a), but would need to be
    specified on the executable creation step.

    I made changes in LibrarySet.java
    (http://cvs.sourceforge.net/viewcvs.py/ant-
    contrib/cpptasks/src/net/sf/antcontrib/cpptasks/types/Library
    Set.java) that, in effect, cause libsets to be ignored when
    building a static library. The latest nightly builds of cpptasks
    (http://gump.covalent.net/jars/2004-04-21/cpptasks/)
    should have these changes.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks