Bug #368
Compilation problem with gcc 4.4
| Status: | Closed | Start date: | 10/13/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% | ||
| Category: | Core & System | |||
| Target version: | Release 2.0 | |||
| Resolution: | fixed | Pull request: | ||
| Affected Versions: |
Description
Reported by George L. Emigh (http://lists.opennebula.org/pipermail/users-opennebula.org/2010-October/002959.html):
when attempting to build OpenNebula 2.0 RC1 from source on Fedora 13 I am getting this error: scons: done reading SConscript files. scons: Building targets ... g++ -o src/nebula/oned -g src/nebula/oned.o -Lsrc/common -Lsrc/log -Lsrc/sql - Lsrc/host -Lsrc/mad -Lsrc/nebula -Lsrc/pool -Lsrc/template -Lsrc/vm -Lsrc/vmm -Lsrc/lcm -Lsrc/tm -Lsrc/dm -Lsrc/im -Lsrc/image -Lsrc/rm -Lsrc/vnm -Lsrc/hm - Lsrc/um -Lsrc/authm -lxmlrpc_client++ -lnebula_core -lnebula_vmm -lnebula_lcm -lnebula_im -lnebula_hm -lnebula_rm -lnebula_dm -lnebula_tm -lnebula_um - lnebula_authm -lnebula_mad -lnebula_template -lnebula_image -lnebula_pool - lnebula_host -lnebula_vnm -lnebula_vm -lnebula_common -lnebula_sql - lnebula_log -lcrypto -lsqlite3 -lxmlrpc_server_abyss++ -lxmlrpc_server++ - lxmlrpc_server_abyss -lxmlrpc++ -lxmlrpc_server -lxmlrpc_abyss -lxmlrpc -lxml2 -lz -lm -lxmlrpc_util /usr/bin/ld: src/nebula/libnebula_core.a(Nebula.o): undefined reference to symbol 'pthread_sigmask@@GLIBC_2.2.5' /usr/bin/ld: note: 'pthread_sigmask@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line /lib64/libpthread.so.0: could not read symbols: Invalid operation collect2: ld returned 1 exit status scons: *** [src/nebula/oned] Error 1 scons: building terminated because of errors.
I guess it only needed this:
$ diff -u SConstruct.orig SConstruct
--- SConstruct.orig 2010-10-12 18:10:45.824754684 -0400
+++ SConstruct 2010-10-12 18:33:45.585754639 -0400
@@ -40,6 +40,8 @@
if os.environ.has_key('LDFLAGS'):
main_env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
+main_env['LINKFLAGS'] += ['-pthread']
+
# Add builders for flex and bison
add_lex(main_env)
add_bison(main_env)
Associated revisions
Bug #368: Added -pthread to link flags
History
#1
Updated by Javi Fontan over 10 years ago
- Status changed from Assigned to Closed
- Resolution set to fixed