Bug 764004 (GLUSTER-2272) - symbol errors with new gcc
Summary: symbol errors with new gcc
Keywords:
Status: CLOSED NOTABUG
Alias: GLUSTER-2272
Product: GlusterFS
Classification: Community
Component: glusterd
Version: 3.1.1
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Vijay Bellur
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-04 22:52 UTC by Harshavardhana
Modified: 2015-03-23 01:04 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Harshavardhana 2011-01-04 22:03:16 UTC
(In reply to comment #0)
> [root@sysrq ~]# /etc/init.d/glusterd restart
> Stopping glusterd:                                         [FAILED]
> Starting glusterd:/usr/sbin/glusterd: symbol lookup error:
> /usr/lib64/libgfrpc.so.0: undefined symbol: gf_log_xl_log_set
> 

CFLAGS used during RPM compilation are following 

-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic

Just source compilation with "-O2 -g" works fine

Comment 1 Harshavardhana 2011-01-04 22:52:05 UTC
[root@sysrq ~]# /etc/init.d/glusterd restart
Stopping glusterd:                                         [FAILED]
Starting glusterd:/usr/sbin/glusterd: symbol lookup error: /usr/lib64/libgfrpc.so.0: undefined symbol: gf_log_xl_log_set


[root@sysrq ~]# gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.5.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC)

Comment 2 Amar Tumballi 2011-01-05 01:03:03 UTC
I have seen this particular error, and this is caused by not properly doing a 'ldconfig'. If you do 'hash -r' and 'ldconfig' after installation, you wont see these errors.

Comment 3 Harshavardhana 2011-01-05 02:50:01 UTC
(In reply to comment #2)
> I have seen this particular error, and this is caused by not properly doing a
> 'ldconfig'. If you do 'hash -r' and 'ldconfig' after installation, you wont see
> these errors.

This is not because of ldconfig, if you read my description it says RPMS. During our rpm installation we do ldconfig on /usr/lib64, nevertheless the issue is not with ldconfig. 

Its with how the gf_log_xl_log_set is defined, some how the "extern char gf_log_xl_log_set" is considered to be undefined could be due to fact that the linking itself is wrong in the first place. 

Point to be noted is that with those CFLAGS set to default "-O2 -g" as in ./configure it doesn't happen. 

There is something fishy with one of the gcc options, or we have an internal problem not keeping up with gcc standards.

Comment 4 Harshavardhana 2011-01-26 22:25:31 UTC
> There is something fishy with one of the gcc options, or we have an internal
> problem not keeping up with gcc standards.

Confirming this happens with new "gcc" how it handles our "extern" primitives on gf_log_xl_log_set. There are certain CFLAGS which get added during rpmbuild which would trigger this error.

We fix it to adhere to gcc standards or just add "CFLAGS=-O2 -g" in rpm specification file. 

Reproducibility: V.Easy on FC14 - gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC)


Note You need to log in before you can comment on or make changes to this bug.