[SERVER-238] Build fail in util/allocator.h Created: 15/Aug/09  Updated: 12/Jul/16  Resolved: 15/Aug/09

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 0.9.8
Fix Version/s: 0.9.9

Type: Bug Priority: Critical - P2
Reporter: Johan Bergström Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.25-gentoo-r6 x86_64)
=================================================================
System uname: Linux-2.6.25-gentoo-r6-x86_64-Intel-R-_Pentium-R-_D_CPU_2.80GHz-with-gentoo-1.12.11.1
boost: 1.35


Participants:

 Description   

<snip>
g++ -o shell/utils.o -c -Wnon-virtual-dtor -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -O3 -D_SCONS -DUSE_ASIO_OFF -DXP_UNIX -DUSE_ASIO_OFF -DXP_UNIX -DUSE_READLINE -I. shell/utils.cpp
g++ -o mongos -fPIC -pthread stdafx.o buildinfo.o db/jsobj.o db/json.o db/commands.o db/lasterror.o db/nonce.o db/queryutil.o shell/mongo.o util/background.o util/mmap.o util/sock.o util/util.o util/message.o util/assert_util.o util/httpclient.o util/md5.o util/md5main.o client/connpool.o client/dbclient.o client/model.o scripting/engine.o util/mmap_posix.o util/processinfo_linux2.o scripting/engine_spidermonkey.o util/message_server_port.o util/message_server_asio.o s/strategy.o s/strategy_shard.o s/strategy_single.o s/commands_admin.o s/commands_public.o s/request.o s/cursors.o s/server.o s/shard.o s/shardkey.o s/config.o -L/usr/lib64 -L/lib64 -lpthread -lstdc++ -lboost_thread-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_system-mt -lpcrecpp -lpcre -ljs
g++ -o mongo -fPIC -pthread shell/dbshell.o shell/utils.o -L/usr/lib64 -L/lib64 -L. -lmongoclient -lpthread -lstdc++ -lboost_thread-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_system-mt -ljs -lboost_thread-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_system-mt -ljs -lreadline -lncurses -lrt
shell/utils.o: In function `ourmalloc':
/var/tmp/portage/dev-db/mongodb-0.9.8/work/mongodb-mongo-75a58367af664525db5e7226db81082be19e4f06/shell/../client/../util/allocator.h:27: undefined reference to `mongo::dbexit(mongo::ExitCode, char const*)'
shell/utils.o: In function `ourrealloc':
/var/tmp/portage/dev-db/mongodb-0.9.8/work/mongodb-mongo-75a58367af664525db5e7226db81082be19e4f06/shell/../client/../util/allocator.h:33: undefined reference to `mongo::dbexit(mongo::ExitCode, char const*)'
/var/tmp/portage/dev-db/mongodb-0.9.8/work/mongodb-mongo-75a58367af664525db5e7226db81082be19e4f06/shell/../client/../util/allocator.h:33: undefined reference to `mongo::dbexit(mongo::ExitCode, char const*)'
/var/tmp/portage/dev-db/mongodb-0.9.8/work/mongodb-mongo-75a58367af664525db5e7226db81082be19e4f06/shell/../client/../util/allocator.h:33: undefined reference to `mongo::dbexit(mongo::ExitCode, char const*)'
shell/utils.o: In function `ourmalloc':
/var/tmp/portage/dev-db/mongodb-0.9.8/work/mongodb-mongo-75a58367af664525db5e7226db81082be19e4f06/shell/../client/../util/allocator.h:27: undefined reference to `mongo::dbexit(mongo::ExitCode, char const*)'
collect2: ld returned 1 exit status
scons: *** [mongo] Error 1
scons: building terminated because of errors.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 10/Sep/09 ]

closed b/c resolved more than 2 week ago

Comment by Johan Bergström [ 15/Aug/09 ]

"mindleak" on the irc freenode channel apparently had the same issue which he fixed by prepending LIBPATH instead of appending it. git diff below:

diff --git a/SConstruct b/SConstruct
index 99c15f5..ca21461 100644
— a/SConstruct
+++ b/SConstruct
@@ -872,7 +872,7 @@ elif not onlyServer:

shellEnv.VariantDir( "32bit" , "." )
else:

  • shellEnv.Append( LIBPATH=[ "." ] )
    + shellEnv.Prepend( LIBPATH=[ "." ] )

shellEnv = doConfigure( shellEnv , needPcre=False , needJava=False , shell=True )

Generated at Thu Feb 08 02:53:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.