Bug #368

Compilation problem with gcc 4.4

Added by Javi Fontan over 10 years ago. Updated over 10 years ago.

Status:ClosedStart date:10/13/2010
Priority:NormalDue date:
Assignee:Javi Fontan% Done:


Category:Core & System
Target version:Release 2.0
Resolution:fixed Pull request:
Affected Versions:


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

Associated revisions

Revision 0f1da0b9
Added by Javi Fontan over 10 years ago

Bug #368: Added -pthread to link flags


#1 Updated by Javi Fontan over 10 years ago

  • Status changed from Assigned to Closed
  • Resolution set to fixed

Also available in: Atom PDF