Solaris binaries

686 views
Skip to first unread message

Neil

unread,
Jan 31, 2012, 6:43:45 AM1/31/12
to mongodb-user
NB: This are the Solaris mongodb binaries from the website.

-bash-3.2# ./mongod --help
ld.so.1: mongod: fatal: libstdc++.so.6: open failed: No such file or
directory
Killed

-bash-3.2# ldd mongod | grep not
libstdc++.so.6 => (file not found)
libgcc_s.so.1 => (file not found)

Oh, looks like some silly person built this with gcc and didn’t
include the correct RUNPATHs or libs with his binaries:

bash-3.2# /usr/ccs/bin/elfdump mongod | grep RUNPA
[10] RUNPATH 0xa52ca /opt/gcc/gcc44/lib/
amd64


Instead of hacking LD_LIBRARY_PATH we’ll just satisfy the binary
runpath:

-bash-3.2# find /usr -name libgcc_s.so.1
/usr/sfw/lib/libgcc_s.so.1
/usr/sfw/lib/amd64/libgcc_s.so.1

-bash-3.2# mkdir -p /opt/gcc/gcc44/lib/amd64
-bash-3.2# cp /usr/sfw/lib/amd64/libgcc_s.so.1 /opt/gcc/gcc44/lib/
amd64/
-bash-3.2# cp /usr/sfw/lib/amd64/libstdc++.so.6 /opt/gcc/gcc44/lib/
amd64/
-bash-3.2# ./mongod –help
ld.so.1: mongod: fatal: relocation error: file mongod: symbol
_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l:
referenced symbol not found

WTF. Someone has not only messed up their -R ld options, but built
this with their OWN gcc which isn’t even binary compatible with the
version that ships with the Solaris 10 gcc runtimes ?!?!?!?!?!?!

How insanely stupid can you get? Probably they couldn’t get it to
compile with the stock gcc as its version 3.

Fortunately I had the gcc4 runtime libs handy:

-bash-3.2# gunzip gcc4g++rt-4.5.1\,REV\=2010.09.01-SunOS5.10-i386-
CSW.pkg.gz
-bash-3.2# gunzip gcc4corert-4.5.1\,REV\=2010.09.01-SunOS5.10-i386-
CSW.pkg.gz
-bash-3.2# pkgtrans gcc4corert-4.5.1\,REV\=2010.09.01-SunOS5.10-i386-
CSW.pkg . all
Transferring <CSWgcc4corert> package instance

-bash-3.2# pkgtrans gcc4g++rt-4.5.1\,REV\=2010.09.01-SunOS5.10-i386-
CSW.pkg . all
Transferring <CSWgcc4g++rt> package instance
-bash-3.2#

-bash-3.2# cp CSWgcc4g++rt/reloc/gcc4/lib/amd64/libstdc++.so.6.0.10 /
opt/gcc/gcc44/lib/amd64/
-bash-3.2# cp CSWgcc4corert/reloc/gcc4/lib/amd64/libgcc_s.so.1 /opt/
gcc/gcc44/lib/amd64/
-bash-3.2# ln -s /opt/gcc/gcc44/lib/amd64/libstdc++.so.6.0.10 /opt/gcc/
gcc44/lib/amd64/libstdc++.so.6
-bash-3.2# /opt/mongodb/bin/mongod --help
Allowed options:

General options:
-h [ --help ] show this usage information

<snip>

I would suggest you either learn how to compile software properly for
sunos, or remove the binary packages for solaris all together.






Mathias Stearn

unread,
Jan 31, 2012, 12:19:42 PM1/31/12
to mongod...@googlegroups.com
Mongodb currently requires gcc 4.0 or higher to compile. So the default solaris gcc is not enough (why solaris defaults to an 8 year old compiler is beyond me...)

We have had other issues with the solaris build environment. In particular they seem to make it impossible to ship static binaries, which is our default on other platforms in order to minimize run-time dependencies. Our build scripts are currently being refactored and one of the results should be better solaris support. If you'd like to help with this effort, please feel free to submit a patch or pull-request to this repo: https://github.com/mongodb/mongo. None of us are solaris experts, so if you have any advice on how to compile software properly for sunos we'd appreciate it.

Jorge Costa

unread,
Feb 1, 2012, 10:24:04 AM2/1/12
to mongod...@googlegroups.com
I've tried to get it running on solaris 11, same results.
I thought about compiling it, but my experience of compiling stuff on solaris tells me that it will be quicker to try a different platform.
which bugs me, as I was keen on using zones.

how well does mongodb works on freebsd ?
freebsd jails might do what I need


On 31/01/12 17:19, Mathias Stearn wrote:
Mongodb currently requires gcc 4.0 or higher to compile. So the default solaris gcc is not enough (why solaris defaults to an 8 year old compiler is beyond me...)

We have had other issues with the solaris build environment. In particular they seem to make it impossible to ship static binaries, which is our default on other platforms in order to minimize run-time dependencies. Our build scripts are currently being refactored and one of the results should be better solaris support. If you'd like to help with this effort, please feel free to submit a patch or pull-request to this repo: https://github.com/mongodb/mongo. None of us are solaris experts, so if you have any advice on how to compile software properly for sunos we'd appreciate it.
--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mongodb-user/-/8jApnGEoC78J.
To post to this group, send email to mongod...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

Mathias Stearn

unread,
Feb 1, 2012, 12:26:53 PM2/1/12
to mongod...@googlegroups.com, jorge.co...@gmail.com
Linux is currently the most battle tested environment for MongoDB as the vast majority of production deployments are linux based. Due to this, it is also where we've spent the most effort on platform-specific optimizations. We do have a FreeBSD buildbot, and it passes our tests, however there have been reports of performance issues in production, in some cases due to the automatic usage of huge pages.

tl;dr: If you have a choice of platforms for MongoDB deployment Linux is currently the best bet.

Jorge Costa

unread,
Feb 1, 2012, 2:38:19 PM2/1/12
to mongod...@googlegroups.com

evaluating it on linux with openvz....

Mathias Stearn

unread,
Feb 1, 2012, 2:50:33 PM2/1/12
to mongod...@googlegroups.com, jorge.co...@gmail.com
Actually OpenVZ has some known issues with MongoDB in relation how OpenVZ handles memory mapped files[1]. What do you need OpenVZ or freebsd jails for? If you give me some details on your use case, I'll try to suggest an alternative.

Jorge Costa

unread,
Feb 2, 2012, 7:00:34 AM2/2/12
to mongod...@googlegroups.com, mat...@10gen.com
According to link, it seems that the issues were fixed with the latest RH6.x kernels, by adjusting the new parameters.

"
Now you can set two primary parameters: physpages and swappages, while all the other beancounters become secondary and optional.

    physpages

    This parameter limits the physical memory (RAM) available to processes inside a container.
    The barrier is ignored and should be set to 0, and the limit sets the limit.
    Currently (as of >= 042stab042) the user memory, the kernel memory and the page cache are accounted into physpages.

    swappages

    This parameter limits the amount of swap space which can be used for processes inside a container.
    The barrier is ignored and should be set to 0, and the limit sets the limit.

The sum of physpages.limit and swappages.limit limits the maximum amount of allocated memory which can be used by a container. When physpages limit is reached, memory pages belonging to the container are pushed out to so called virtual swap (vswap). The difference between normal swap and vswap is that with vswap no actual disk I/O usually occurs. Instead, a container is artificially slowed down, to emulate the effect of the real swapping. Actual swap out occurs only if there is a global memory shortage on the system.
"

I need to read a little bit more about vSwap, that concept of slowing down a vm doesn't make any sense in my view.
Might have to look into KVM+KSM instead.

this is just for dev-test and a bit of research, I want to evaluate the use of NFS with mongodb.
I've seen notes that mongodb doesn't advise the NFS use for data files or journalling,

"we have found that some version of NFS perform poorly, or simply don't work, and do not suggest using NFS"
http://www.mongodb.org/display/DOCS/NFS

I want to understand the reasons and out it can scale, as we run large oracle, db2, mysql, informix  DBs on NFS with no issues or minimal performance degradation, I'd expect mongodb to perform in a similar manner.


cheers for the update
jorge

Lorenzo Eccher

unread,
Jun 26, 2014, 11:21:53 AM6/26/14
to mongod...@googlegroups.com
Hi Neil.

I am working on an old SunOs installation on a little server.

I should install the mongodb but I have the issue you descrtibe.

I know that some monthes passed but I'd like to know if is possible have the compiled
libstdc++
and libgcc_s

Needed

Thanks
Reply all
Reply to author
Forward
0 new messages