ldmtop68 / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

compiling/linking doesn't work on Ubuntu 11.04 with GCC 4.6 #444

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. pull the google-breakpad code from SVN with `svn checkout 
http://google-breakpad.googlecode.com/svn/trunk/ google-breakpad-read-only`
2. run ./configure
3. run make

What is the expected output? What do you see instead?
i expect the program to compile and link properly, instead i see:
g++  -g -O2 -ldl  -o src/tools/linux/symupload/minidump_upload 
src/common/linux/http_upload.o src/tools/linux/symupload/minidump_upload.o  
src/common/linux/http_upload.o: In function 
`google_breakpad::HTTPUpload::SendRequest(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, 
std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> 
>, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 
std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> 
> >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, 
std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, 
std::allocator<char> > > > > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> >*, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> >*)':
/home/lavid/workspace/google-breakpad-read-only/src/common/linux/http_upload.cc:
69: undefined reference to `dlopen'
/home/lavid/workspace/google-breakpad-read-only/src/common/linux/http_upload.cc:
88: undefined reference to `dlsym'
/home/lavid/workspace/google-breakpad-read-only/src/common/linux/http_upload.cc:
100: undefined reference to `dlsym'
/home/lavid/workspace/google-breakpad-read-only/src/common/linux/http_upload.cc:
116: undefined reference to `dlsym'
/home/lavid/workspace/google-breakpad-read-only/src/common/linux/http_upload.cc:
136: undefined reference to `dlsym'
/home/lavid/workspace/google-breakpad-read-only/src/common/linux/http_upload.cc:
150: undefined reference to `dlsym'

Please use labels and text to provide additional information.

if i instead run
g++ -g -O2 -o src/tools/linux/symupload/minidump_upload 
src/common/linux/http_upload.o src/tools/linux/symupload/minidump_upload.o  
-ldl
by hand, it compiles & links just fine. 
additionally, i think the Makefile.in file should be generated during the 
automake process, but i'm no automake expert.

apologies if i'm doing something dumb.

Original issue reported on code.google.com by laviddic...@gmail.com on 1 Sep 2011 at 11:26

GoogleCodeExporter commented 9 years ago
oh, right, my linker version:
GNU ld (GNU Binutils for Ubuntu) 2.21.51.20110409
and gcc:
gcc (Ubuntu 4.6.0-3~ppa1) 4.6.1 20110409 (prerelease)

and again, apologies if i'm 'doing it wrong.'

Original comment by laviddic...@gmail.com on 1 Sep 2011 at 11:46

GoogleCodeExporter commented 9 years ago
I've run into the same issue as of 11/2/11. Ubuntu 11.10, g++-4.6. The issue is 
repeatable with g++-4.4 as well.

Installing g++-4.4, linking /usr/bin/g++ to /usr/bin/g++-4.4, and a make clean 
and make produced no errors, however the single compilation command below still 
produced the same error output.

$ g++ -g -O2 -o src/tools/linux/symupload/minidump_upload 
src/common/linux/http_upload.o src/tools/linux/symupload/minidump_upload.o
src/common/linux/http_upload.o: In function 
`google_breakpad::HTTPUpload::SendRequest(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, 
std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> 
>, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 
std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> 
> >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, 
std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, 
std::allocator<char> > > > > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> >*, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> >*)':
/home/epowell/src/google-breakpad-read-only/src/common/linux/http_upload.cc:69: 
undefined reference to `dlopen'
/home/epowell/src/google-breakpad-read-only/src/common/linux/http_upload.cc:88: 
undefined reference to `dlsym'
/home/epowell/src/google-breakpad-read-only/src/common/linux/http_upload.cc:100:
 undefined reference to `dlsym'
/home/epowell/src/google-breakpad-read-only/src/common/linux/http_upload.cc:116:
 undefined reference to `dlsym'
/home/epowell/src/google-breakpad-read-only/src/common/linux/http_upload.cc:136:
 undefined reference to `dlsym'
/home/epowell/src/google-breakpad-read-only/src/common/linux/http_upload.cc:150:
 undefined reference to `dlsym'
src/common/linux/http_upload.o:/home/epowell/src/google-breakpad-read-only/src/c
ommon/linux/http_upload.cc:153: more undefined references to `dlsym' follow
src/common/linux/http_upload.o: In function 
`google_breakpad::HTTPUpload::SendRequest(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, 
std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> 
>, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 
std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> 
> >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, 
std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, 
std::allocator<char> > > > > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> >*, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> >*)':
/home/epowell/src/google-breakpad-read-only/src/common/linux/http_upload.cc:176:
 undefined reference to `dlclose'
/home/epowell/src/google-breakpad-read-only/src/common/linux/http_upload.cc:72: 
undefined reference to `dlerror'
/home/epowell/src/google-breakpad-read-only/src/common/linux/http_upload.cc:73: 
undefined reference to `dlopen'
/home/epowell/src/google-breakpad-read-only/src/common/linux/http_upload.cc:78: 
undefined reference to `dlopen'
/home/epowell/src/google-breakpad-read-only/src/common/linux/http_upload.cc:81: 
undefined reference to `dlopen'
/home/epowell/src/google-breakpad-read-only/src/common/linux/http_upload.cc:94: 
undefined reference to `dlclose'
collect2: ld returned 1 exit status

$ which g++
/usr/bin/g++

$ ls -l /usr/bin/g++
lrwxrwxrwx 1 root root 7 2011-08-14 02:16 /usr/bin/g++ -> g++-4.6

Original comment by epow...@zenossinc.com on 2 Nov 2011 at 7:26

GoogleCodeExporter commented 9 years ago
Workaround for the time being is to configure by doing the following: 
LIBS="-ldl" ./configure <YOUR NORMAL CONFIGURE ARGS>

Original comment by laviddic...@gmail.com on 14 Nov 2011 at 6:41

GoogleCodeExporter commented 9 years ago
Changing LDFLAGS to LDADD in Makefile.am (and re-running automake) fixes the 
problem for me. Attached is a patch with those changes.

Original comment by pkwar...@gmail.com on 5 Dec 2011 at 7:18

Attachments:

GoogleCodeExporter commented 9 years ago
Having the same issue.  I also noticed errors in the config.log trying to link 
the pthread library.  Ubuntu does not have a libpthread.  I've attached the log.

Original comment by randall....@gmail.com on 19 Jan 2012 at 5:22

Attachments:

GoogleCodeExporter commented 9 years ago
LIBS="-ldl" ./configure  works for me. Working on Ubuntu 11.10, g++ 4.6.1

Original comment by randall....@gmail.com on 19 Jan 2012 at 6:23

GoogleCodeExporter commented 9 years ago
I just came up with breakpad-gcc46.patch independently. That was a waste of 
time.

Original comment by thestig@chromium.org on 19 Apr 2012 at 4:42

GoogleCodeExporter commented 9 years ago
r955

Original comment by thestig@chromium.org on 19 Apr 2012 at 6:32