[SERVER-11060] unable to start server with GCC 3.4.3 runtime libraries Created: 07/Oct/13  Updated: 10/Dec/14  Resolved: 28/Oct/13

Status: Closed
Project: Core Server
Component/s: Admin, Build, Packaging
Affects Version/s: 2.4.6
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Amy Cui Assignee: Benety Goh
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris 10 64-bit Intel
SunOS Generic_127128-11 i86pc i386 i86pc


Participants:

 Description   

3 main issues identified with the GCC runtime libraries installed on the user's machine:

  • GCC was installed as a sunfreeware.com package in /usr/sfw/lib/64
    • mongod does not search directories in /usr/sfw for required dynamic libraries
  • GCC version installed was 3.4.3
    • mongod is built using GCC 4.6.3
  • user's initial search path for dynamic libraries included the directory /usr/sfw/lib
    • this directory is for 32-bit binaries which caused mongod to try to load the 32-bit version of the gcc library libstdc++.so

---------------
Installed mongo 2.4.6 on sun solaris, when trying to start mongod, got below error:

>./bin/mongod
ld.so.1: mongod: fatal: /usr/sfw/lib/libstdc++.so.6: wrong ELF class: ELFCLASS32
Killed

My env is SunOS Generic_127128-11 i86pc i386 i86pc

Please advise how to fix this



 Comments   
Comment by Benety Goh [ 28/Oct/13 ]

The version of GCC on the user's machine needs to be upgraded to 4.6.3 or newer.

Comment by Benety Goh [ 24/Oct/13 ]

Hi Amy,

Our Solaris binary is built using GCC 4.6.3. Do you have access to a machine with a more recent version of GCC?

Thanks
Ben

Comment by Amy Cui [ 24/Oct/13 ]

Hi Ben,

Here are the details:

>gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with: /sfw10/builds/build/sfw10-patch/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)

>cat /etc/release
Solaris 10 5/08 s10x_u5wos_10 X86
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 24 March 2008

>ls -l /usr/sfw/lib/64/libstdc++.so.6*
lrwxrwxrwx 1 root root 18 May 15 2008 /usr/sfw/lib/64/libstdc+.so.6 -> libstdc+.so.6.0.3*
-r-xr-xr-x 1 root bin 5625312 Jan 22 2005 /usr/sfw/lib/64/libstdc++.so.6.0.3*

> nm /usr/sfw/lib/64/libgcc_s.so.1 | grep GCC
[215] | 0| 0|OBJT |GLOB |0 |ABS |GCC_3.0
[219] | 0| 0|OBJT |GLOB |0 |ABS |GCC_3.3
[246] | 0| 0|OBJT |GLOB |0 |ABS |GCC_3.3.1
[220] | 0| 0|OBJT |GLOB |0 |ABS |GCC_3.4
[290] | 0| 0|OBJT |GLOB |0 |ABS |GCC_3.4.2

Thanks
Amy

Comment by Benety Goh [ 24/Oct/13 ]

Hi Amy,

1) What version of GCC do you have installed?
2) Here are a few more commands you can run to help us find out more about your environment:

% cat /etc/release
% ls -l /usr/sfw/lib/64/libstdc++.so.6*
% nm /usr/sfw/lib/64/libgcc_s.so.1 | grep GCC

Thanks
Ben

Comment by Amy Cui [ 23/Oct/13 ]

Here is the output:
/u/tcui>lib -follow -type f -name "libgcc_s.so.1*" <
find: cannot read dir /usr/lib/scn/bin: Permission denied
find: cannot read dir /usr/lib/scn/lib: Permission denied
find: cannot read dir /usr/lib/cc-cfw: Permission denied
/usr/sfw/lib/amd64/libgcc_s.so.1
/usr/sfw/lib/64/libgcc_s.so.1
/usr/sfw/lib/libgcc_s.so.1

Comment by Benety Goh [ 22/Oct/13 ]

Hi Amy,

Let's see if there's a version of libgcc_s.so.1 on your system that we might be able to use. Could you please run:

% find /lib /usr/lib /usr/sfw/lib -follow -type f -name "libgcc_s.so.1*"

Thanks
Ben

Comment by Amy Cui [ 22/Oct/13 ]

Hi Ben,

I tried this:
1) export LD_LIBRARY_PATH_64=/usr/sfw/lib/64
./bin/mongod

got below error:

ld.so.1: mongod: fatal: libgcc_s.so.1: version `GCC_4.0.0' not found (required by file bin/mongod)
ld.so.1: mongod: fatal: libgcc_s.so.1: open failed: No such file or directory
Killed

2) env LD_LIBRARY_PATH_64=/usr/sfw/lib/64 ./bin/mongod

prints out my env varialbes and then garbage characters live below:
®x®¬®À®Ô¨®è¸®üȮخ$è®8ø®®`®t(®8®H®°X®Äh®Øx®ì®®¨®(¸®<
È®PØ®dè®xø® ®´(®È8®ÜH®ðX®h®x®,®@®T¨®h¸®|Ȯخ¤è®¸ø®®à®ô
(8®H®0X®Dh®Xx®l®®¨®¨¸®¼È®ÐØ®äè®øø®^® ®4(®H8®\H®pX®

Thanks
Amy

Comment by Benety Goh [ 22/Oct/13 ]

Hi Amy,

Could you please try running ./mongod like this?

% env LD_LIBRARY_PATH_64=/usr/sfw/lib/64 ./bin/mongod

Thanks
Ben

Comment by Amy Cui [ 22/Oct/13 ]

Hi Ben,

here is the output:
>uname -a
SunOS inafp06wk23 5.10 Generic_127128-11 i86pc i386 i86pc/usr/sfw/lib/amd64/libstdc++.so.6

>find /usr/sfw/ /usr/lib -follow -type f -name "libstdc++.so.6"
/usr/sfw/lib/64/libstdc++.so.6
/usr/sfw/lib/libstdc++.so.6
find: cannot read dir /usr/lib/scn/bin: Permission denied
find: cannot read dir /usr/lib/scn/lib: Permission denied
find: cannot read dir /usr/lib/cc-cfw: Permission denied

set | grep LIBRARY_PATH
LD_LIBRARY_PATH=/u/tcui/pcfn/dev/sunlib:/opt/mqm/lib:/oracle_home/oracle/product/9.2.0/lib32:/oracle_home/oracle/product/9.2.0/lib:/usr/sfw/lib

Comment by Benety Goh [ 22/Oct/13 ]

Hi Amy,

Could you please run the following commands on the amd64 machine? We'd like to figure out if you have the 64-bit version of libstdc++.so.6 installed.

% uname -a
% find /usr/sfw/ /usr/lib -follow -type f -name "libstdc++.so.6"
% set | grep LIBRARY_PATH

Thanks
Ben

Comment by Amy Cui [ 22/Oct/13 ]

Of course. Here is the file name: mongodb-sunos5-x86_64-2.4.6.tgz

Comment by Daniel Pasette (Inactive) [ 22/Oct/13 ]

Did you download the binaries from http://downloads.mongodb.org?

Comment by Amy Cui [ 21/Oct/13 ]

Any suggestions??

Comment by Amy Cui [ 09/Oct/13 ]

Dan,

thanks for the reply. I tried in two unix boxes, looks like both of them are 64bit. but mongod won't start:

>isainfo -kv
>64-bit sparcv9 kernel modules

>isainfo -kv
>64-bit amd64 kernel modules

Please advise.
Thanks

Amy

Comment by Daniel Pasette (Inactive) [ 09/Oct/13 ]

can you check if you're running the 32-bit version of the OS? MongoDB only supports 64-bit Solaris version.

Run: isainfo -v

Generated at Thu Feb 08 03:24:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.