pbzip2 1.1.x - fix compile/link error on older gcc
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pbzip2 |
New
|
Undecided
|
Unassigned |
Bug Description
From: Jan 'RedBully' Seiffert <kaffeemonster /at/ googlemail [dot] com>
date Fri, Jul 2, 2010 at 9:15 AM
subject [patch] fix compile/link error on older gcc
Hiho!
I tried to install the latest pbzip2-1.1.1 on an older SuSE 9.0 (don't
ask). Unfortunatly that failed.
The compiler would eat it, but then the linker hat some problems about
unresolved symbols in all this C++ fluff.
Basically some .gnu.linkonce.t symbol with all this typetrait BS for
allocator sysmbol whatever (i don't understand this C++ gibberish,
whats wrong with malloc, ahh, yes, i remember C++ typesystem is anal).
gcc is:
$ gcc --version
gcc (GCC) 3.3.1 (SuSE Linux)
Copyright (C) 2003 Free Software Foundation, Inc.
....
$ make
g++ -O2 -D_LARGEFILE64_
-D_POSIX_
pbzip2.cpp BZ2StreamScanne
pbzip2.cpp: In function `void* fileWriter(void*)':
pbzip2.cpp:1387: warning: assignment to `int' from `double'
pbzip2.cpp:1387: warning: argument to `int' from `double'
/tmp/ccOEJEw7.
In function `std::basic_
std::char_
>::operator=
: undefined reference to `std::char_
char>::
/tmp/ccOEJEw7.
In function `std::basic_
std::char_
>::assign(unsigned char const*, unsigned)':
: undefined reference to `std::char_
char>::
/tmp/ccOEJEw7.
In function `std::basic_
std::char_
>::assign(unsigned char const*, unsigned)':
: undefined reference to `std::char_
char>::
/tmp/ccOEJEw7.
In function `std::basic_
std::char_
>::_S_copy_
const*)':
: undefined reference to `std::char_
char>::
/tmp/ccOEJEw7.
In function `std::basic_
std::char_
>::compare(
: undefined reference to `std::char_
char>::
/tmp/ccOEJEw7.
In function `std::basic_
std::char_
>::compare(
: undefined reference to `std::char_
char>::
/tmp/ccOEJEw7.
In function `std::basic_
std::char_
>::_M_mutate(
: undefined reference to `std::char_
char>::
/tmp/ccOEJEw7.
In function `std::basic_
std::char_
>::_M_mutate(
: undefined reference to `std::char_
char>::
/tmp/ccOEJEw7.
In function `std::basic_
std::char_
>::_M_mutate(
: undefined reference to `std::char_
char>::
collect2: ld returned 1 exit status
make: *** [pbzip2] Error 1
looks like what the compiler generates can not be linked.
So i made a patch to solve this by lowering this problematic C++ to C.
Maybe it is usefull to you.
Greetings
Jan
I'll try to find/setup an environment with older g++ version to see what happens (I suspect there is some mismatch with the relevant version of the libstdc++ runtime library).