How to compile mongodb with static linking?

522 views
Skip to first unread message

Sergei Tulentsev

unread,
Mar 20, 2011, 8:19:59 AM3/20/11
to mongod...@googlegroups.com
I've tried "scons all -- 64 --release --static" but still on the server it requires boost

sergio@cs3512:~$ mongod
mongod: error while loading shared libraries: libboost_system.so.1.42.0: cannot open shared object file: No such file or directory


--
Best regards,
Sergei Tulentsev

Eliot Horowitz

unread,
Mar 20, 2011, 9:37:35 PM3/20/11
to mongod...@googlegroups.com
"scons --release" should be correct.
Did you try that?
If so, can you send the link line?

> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.
> 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.
>

Sergei Tulentsev

unread,
Mar 21, 2011, 5:59:06 AM3/21/11
to mongod...@googlegroups.com
I believe I tried that. Let me double-check.

Sergei Tulentsev

unread,
Mar 21, 2011, 6:57:37 AM3/21/11
to mongod...@googlegroups.com, Eliot Horowitz
Same thing. By link line you mean this?
g++ -o mongod -fPIC -pthread -rdynamic pch.o buildinfo.o db/common.o db/indexkey.o db/jsobj.o bson/oid.o db/json.o db/lasterror.o db/nonce.o db/queryutil.o db/projection.o shell/mongo.o db/security_key.o util/background.o util/sock.o util/util.o util/file_allocator.o util/message.o util/assert_util.o util/log.o util/httpclient.o util/md5main.o util/base64.o util/concurrency/vars.o util/concurrency/task.o util/debug_util.o util/concurrency/thread_pool.o util/password.o util/version.o util/signal_handlers.o util/histogram.o util/concurrency/spin_lock.o util/text.o util/stringutils.o util/concurrency/synchronization.o util/md5.o client/connpool.o client/dbclient.o client/dbclient_rs.o client/dbclientcursor.o client/model.o client/syncclusterconnection.o client/distlock.o s/shardconnection.o db/commands.o util/message_server_port.o client/parallel.o util/miniwebserver.o db/dbwebserver.o db/matcher.o db/dbcommands_generic.o util/mmap.o util/mmap_posix.o util/processinfo.o util/processinfo_linux2.o db/stats/counters.o db/stats/service_stats.o db/stats/snapshots.o db/stats/top.o scripting/engine.o scripting/utils.o scripting/bench.o scripting/engine_spidermonkey.o util/logfile.o util/alignedbuilder.o db/mongommf.o db/dur.o db/durop.o db/dur_writetodatafiles.o db/dur_preplogbuffer.o db/dur_commitjob.o db/dur_recover.o db/dur_journal.o db/query.o db/update.o db/introspect.o db/btree.o db/clientcursor.o db/tests.o db/repl.o db/repl/rs.o db/repl/consensus.o db/repl/rs_initiate.o db/repl/replset_commands.o db/repl/manager.o db/repl/health.o db/repl/heartbeat.o db/repl/rs_config.o db/repl/rs_rollback.o db/repl/rs_sync.o db/repl/rs_initialsync.o db/oplog.o db/repl_block.o db/btreecursor.o db/cloner.o db/namespace.o db/cap.o db/matcher_covered.o db/dbeval.o db/restapi.o db/dbhelpers.o db/instance.o db/client.o db/database.o db/pdfile.o db/cursor.o db/security_commands.o db/security.o db/queryoptimizer.o db/extsort.o db/cmdline.o db/index.o db/geo/2d.o db/geo/haystack.o db/dbcommands.o db/dbcommands_admin.o db/commands/distinct.o db/commands/group.o db/commands/isself.o db/commands/mr.o db/driverHelpers.o s/config.o s/grid.o s/chunk.o s/shard.o s/shardkey.o s/d_logic.o s/d_writeback.o s/d_migrate.o s/d_state.o s/d_split.o client/distlock_test.o s/d_chunk_manager.o db/module.o db/modules/mms.o db/db.o -L/usr/lib64 -L/lib64 -lpthread -lstdc++ -lboost_system-mt -lboost_thread-mt -lboost_filesystem-mt -lboost_program_options-mt -lpcrecpp -lpcre -ljs

On Mon, Mar 21, 2011 at 4:37 AM, Eliot Horowitz <elioth...@gmail.com> wrote:

Eliot Horowitz

unread,
Mar 21, 2011, 10:48:55 PM3/21/11
to mongod...@googlegroups.com
And you're sure that was from scons --release?
Can you send entire console output from when you typed it in?
Doesn't make much sense.

On Mon, Mar 21, 2011 at 6:57 AM, Sergei Tulentsev

Reply all
Reply to author
Forward
0 new messages