This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help Please...


>>>>> Chip Cuntz writes:

Chip> I am getting the following link errors on AIX 4.3.3/GCC 3.0.1.  If I
Chip> put -lpthreads in Makefile the .pthread errors go away.  Whats up with the
Chip> other std::string errors?  What am I missing?

Chip> ld: 0711-317 ERROR: Undefined symbol: std::string::_Rep::_S_max_size
Chip> ld: 0711-317 ERROR: Undefined symbol: std::string::_Rep::_S_terminal
Chip> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock
Chip> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock
Chip> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
Chip> information.
Chip> collect2: ld returned 8 exit status

	The pthread references are because of a libstdc++-v3 configuration
error on AIX unnecessarily referencing pthread functions.  This is fixed
in GCC 3.1 prerelease and mainline.  You can either link with -lpthread,
use the GCC -pthread option, or overwrite
.../include/g++-v3/powerpc-ibm-aix4.3.3.0/bits/gthr-default.h with
gthr-aix.h and install gthr-posix.h along side it.

	The std::string::_Rep::_S_max_size and _S_terminal errors are
because of missing template instantiations.  libstdc++-v3 relies more
heavily on templates and some implicit template semantics are difficult to
implement on systems without weak symbol support.  This reliance is
decreased in GCC 3.1 prerelease and mainline.  In the meantime, you need
to explicitly instantiate those templates in your program.

	I also would recommend upgrading to GCC 3.0.4 for use on AIX.

David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]