You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Andrew Black (JIRA)" <ji...@apache.org> on 2006/01/11 18:52:20 UTC

[jira] Created: (STDCXX-116) [Mac OS X 10.2.8] Examples fail to build due to LD error

[Mac OS X 10.2.8] Examples fail to build due to LD error
--------------------------------------------------------

         Key: STDCXX-116
         URL: http://issues.apache.org/jira/browse/STDCXX-116
     Project: STDCXX
        Type: Bug
  Components: Build  
 Environment: Mac OS X 10.2.8/Darwin 6.8 with GCC 3.1
    Reporter: Andrew Black


When attempting to build the examples as part of the make sequence, I recieve the following messages

gcc -c -I/Volumes/Orion/Work/stdcxx/include/ansi   -D_RWSTD_USE_CONFIG -I/Users/blackaw/Documents/Work/stdcxx//include -I/Volumes/Orion/Work/stdcxx/include -I/Volumes/Orion/Work/stdcxx/examples/include  -pedantic -nostdinc++  -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align  /Volumes/Orion/Work/stdcxx/examples/manual/accum.cpp
gcc accum.o -o accum  -L/Users/blackaw/Documents/Work/stdcxx//lib -lstd  -lsupc++ -lm
ld: archive: /Users/blackaw/Documents/Work/stdcxx//lib/libstd.a has no table of contents, add one with ranlib(1) (can't load from it)
make[2]: *** [accum] Error 1
make[1]: [examples] Error 2 (ignored)

The obvious solution is to call ranlib as part of the make process for the library, but this would involve altering the make proccess for the config tests, library and test library, along with requiring conditional logic to protect other platforms/compilers from this step that would likely cause problems.

Looking at the man page for ranlib on my linux box here, it appears that a better solution could be to define ARFLAGS for gcc as being '-s', though I could potentially see problems emerging were this to be an unconditional definition.

I will try this solution tonight.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (STDCXX-116) [Mac OS X 10.2.8] Examples fail to build due to LD error

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor reassigned STDCXX-116:
-----------------------------------

    Assignee: Andrew Black

Andrew, is this something that we still need to worry about given what Brad said in STDCXX-358? (I.e., that once it's resolved along with issue 357, STDCXX builds and runs fine on Mac OS X.) Or is this an outdated version of the OS and/or compiler? If the latter, please close the issue.

> [Mac OS X 10.2.8] Examples fail to build due to LD error
> --------------------------------------------------------
>
>                 Key: STDCXX-116
>                 URL: https://issues.apache.org/jira/browse/STDCXX-116
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Build
>         Environment: Mac OS X 10.2.8/Darwin 6.8 with GCC 3.1
>            Reporter: Andrew Black
>            Assignee: Andrew Black
>
> When attempting to build the examples as part of the make sequence, I recieve the following messages
> gcc -c -I/Volumes/Orion/Work/stdcxx/include/ansi   -D_RWSTD_USE_CONFIG -I/Users/blackaw/Documents/Work/stdcxx//include -I/Volumes/Orion/Work/stdcxx/include -I/Volumes/Orion/Work/stdcxx/examples/include  -pedantic -nostdinc++  -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align  /Volumes/Orion/Work/stdcxx/examples/manual/accum.cpp
> gcc accum.o -o accum  -L/Users/blackaw/Documents/Work/stdcxx//lib -lstd  -lsupc++ -lm
> ld: archive: /Users/blackaw/Documents/Work/stdcxx//lib/libstd.a has no table of contents, add one with ranlib(1) (can't load from it)
> make[2]: *** [accum] Error 1
> make[1]: [examples] Error 2 (ignored)
> The obvious solution is to call ranlib as part of the make process for the library, but this would involve altering the make proccess for the config tests, library and test library, along with requiring conditional logic to protect other platforms/compilers from this step that would likely cause problems.
> Looking at the man page for ranlib on my linux box here, it appears that a better solution could be to define ARFLAGS for gcc as being '-s', though I could potentially see problems emerging were this to be an unconditional definition.
> I will try this solution tonight.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (STDCXX-116) [Mac OS X 10.2.8] Examples fail to build due to LD error

Posted by "Andrew Black (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Black closed STDCXX-116.
-------------------------------

    Resolution: Won't Fix

Testing with Darwin 8.10.1 (Mac OS X 10.4.10) and GCC 4.2.0 fails to reproduce this issue.

Given that this issue was reported with an antiquated version of the operating system and compiler in question, I am closing this issue as 'Won't Fix'.

> [Mac OS X 10.2.8] Examples fail to build due to LD error
> --------------------------------------------------------
>
>                 Key: STDCXX-116
>                 URL: https://issues.apache.org/jira/browse/STDCXX-116
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Build
>         Environment: Mac OS X 10.2.8/Darwin 6.8 with GCC 3.1
>            Reporter: Andrew Black
>            Assignee: Andrew Black
>
> When attempting to build the examples as part of the make sequence, I recieve the following messages
> gcc -c -I/Volumes/Orion/Work/stdcxx/include/ansi   -D_RWSTD_USE_CONFIG -I/Users/blackaw/Documents/Work/stdcxx//include -I/Volumes/Orion/Work/stdcxx/include -I/Volumes/Orion/Work/stdcxx/examples/include  -pedantic -nostdinc++  -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align  /Volumes/Orion/Work/stdcxx/examples/manual/accum.cpp
> gcc accum.o -o accum  -L/Users/blackaw/Documents/Work/stdcxx//lib -lstd  -lsupc++ -lm
> ld: archive: /Users/blackaw/Documents/Work/stdcxx//lib/libstd.a has no table of contents, add one with ranlib(1) (can't load from it)
> make[2]: *** [accum] Error 1
> make[1]: [examples] Error 2 (ignored)
> The obvious solution is to call ranlib as part of the make process for the library, but this would involve altering the make proccess for the config tests, library and test library, along with requiring conditional logic to protect other platforms/compilers from this step that would likely cause problems.
> Looking at the man page for ranlib on my linux box here, it appears that a better solution could be to define ARFLAGS for gcc as being '-s', though I could potentially see problems emerging were this to be an unconditional definition.
> I will try this solution tonight.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-116) [Mac OS X 10.2.8] Examples fail to build due to LD error

Posted by "Andrew Black (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/STDCXX-116?page=comments#action_12362878 ] 

Andrew Black commented on STDCXX-116:
-------------------------------------

Adding -s to the ARFLAGS value caused the compilation to fail, but manually calling ranlib after making the archive produced the following messages that appear to be harmless on first glance.

ranlib: file: libstd.a(atomic-cxx.o) has no symbols
ranlib: file: libstd.a(export.o) has no symbols
ranlib: file: libstd.a(time_get.o) has no symbols
ranlib: file: libstd.a(vecbool.o) has no symbols

When trying to build the examples, the message I now get is

gcc -c -I/Volumes/Orion/Work/stdcxx/include/ansi   -D_RWSTD_USE_CONFIG -I/Users/blackaw/Documents/Work/build/include -I/Volumes/Orion/Work/stdcxx/include -I/Volumes/Orion/Work/stdcxx/examples/include  -pedantic -nostdinc++  -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align  /Volumes/Orion/Work/stdcxx/examples/manual/accum.cpp
gcc accum.o -o accum  -L/Users/blackaw/Documents/Work/build/lib -lstd  -lsupc++ -lm
ld: multiple definitions of symbol vtable for std::bad_exception
/Users/blackaw/Documents/Work/build/lib/libstd.a(exception.o) definition of vtable for std::bad_exception in section (__DATA,__const)
/usr/lib/gcc/darwin/3.1/libsupc++.a(eh_exception.o) private external definition of vtable for std::bad_exception in section (__DATA,__const)
ld: multiple definitions of symbol vtable for std::bad_alloc
/Users/blackaw/Documents/Work/build/lib/libstd.a(memory.o) definition of vtable for std::bad_alloc in section (__DATA,__const)
/usr/lib/gcc/darwin/3.1/libsupc++.a(new_handler.o) private external definition of vtable for std::bad_alloc in section (__DATA,__const)

I suspect that the message that was recieved about not having a table of contents was a symptom of the messages I now get building the examples, rather than a true problem

> [Mac OS X 10.2.8] Examples fail to build due to LD error
> --------------------------------------------------------
>
>          Key: STDCXX-116
>          URL: http://issues.apache.org/jira/browse/STDCXX-116
>      Project: STDCXX
>         Type: Bug
>   Components: Build
>  Environment: Mac OS X 10.2.8/Darwin 6.8 with GCC 3.1
>     Reporter: Andrew Black

>
> When attempting to build the examples as part of the make sequence, I recieve the following messages
> gcc -c -I/Volumes/Orion/Work/stdcxx/include/ansi   -D_RWSTD_USE_CONFIG -I/Users/blackaw/Documents/Work/stdcxx//include -I/Volumes/Orion/Work/stdcxx/include -I/Volumes/Orion/Work/stdcxx/examples/include  -pedantic -nostdinc++  -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align  /Volumes/Orion/Work/stdcxx/examples/manual/accum.cpp
> gcc accum.o -o accum  -L/Users/blackaw/Documents/Work/stdcxx//lib -lstd  -lsupc++ -lm
> ld: archive: /Users/blackaw/Documents/Work/stdcxx//lib/libstd.a has no table of contents, add one with ranlib(1) (can't load from it)
> make[2]: *** [accum] Error 1
> make[1]: [examples] Error 2 (ignored)
> The obvious solution is to call ranlib as part of the make process for the library, but this would involve altering the make proccess for the config tests, library and test library, along with requiring conditional logic to protect other platforms/compilers from this step that would likely cause problems.
> Looking at the man page for ranlib on my linux box here, it appears that a better solution could be to define ARFLAGS for gcc as being '-s', though I could potentially see problems emerging were this to be an unconditional definition.
> I will try this solution tonight.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira