This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 764004 - (GLUSTER-2272) symbol errors with new gcc
symbol errors with new gcc
Status: CLOSED NOTABUG
Product: GlusterFS
Classification: Community
Component: glusterd (Show other bugs)
3.1.1
All Linux
low Severity low
: ---
: ---
Assigned To: Vijay Bellur
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-04 17:52 EST by Harshavardhana
Modified: 2015-03-22 21:04 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Harshavardhana 2011-01-04 17:03:16 EST
(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 17:52:05 EST
[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-04 20:03:03 EST
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-04 21:50:01 EST
(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 17:25:31 EST
> 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.