[SERVER-16545] scons install fails for source builds from 2.8.0rc2 Created: 14/Dec/14  Updated: 24/Jan/15  Resolved: 14/Dec/14

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

Type: Bug Priority: Major - P3
Reporter: Mark Callaghan Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-16197 "scons install" broken since tools re... Closed
Related
is related to DOCS-4431 Contributors "Build and test" docs ne... Closed
Backwards Compatibility: Minor Change
Operating System: ALL
Participants:

 Description   

I get an error from 'scons install' while building from source for 2.8.0rc2.

My build commands are:
scons --prefix=/b/mongo280rc2 -j4 all > o.all
scons --prefix=/b/mongo280rc2 -j4 install

The error is from 'scons install' :
Source `src/mongo-tools/bsondump' not found, needed by target `/b/mongo280rc2/bin/bsondump'.
scons: building terminated because of errors.

bsondump doesn't occur in the 'scons all' output:
grep bsondump o.all -> nothing

And it isn't in the build result:
ls build/linux2/normal/mongo/ | grep -v \.a
bson
bson_check_test
bson_field_test
bsonobjbuilder_test
bson_obj_test
builder_test
buildinfo.cpp
buildinfo.o
client
config_server_tests
crypto
curop_test
db
dbclient_rs_test
dbtest
dbtests
expression_geo_test
expression_test
expression_text_test
logger
md5_test
mongo
mongobridge
mongod
mongoperf
mongos
mr_test
oid_test
pch.o
processinfo_test
s
scoped_db_conn_test
scripting
server_options_test
shell
sock_test
spin_lock_test
stringutils_test
text_test
tools
unittest
util



 Comments   
Comment by Stennie Steneker (Inactive) [ 14/Dec/14 ]

Hi Mark,

This issue has already been reported as SERVER-16197 / DOCS-4431. The instructions for building from source have not been updated yet to reflect the move of command-line tools to a separate repository for MongoDB 2.8. A checkout & build of mongodb/mongo-tools is now required for the command line tools / "all" target.

Regards,
Stephen

Comment by Mark Callaghan [ 14/Dec/14 ]

And from src/mongo/SConscript, I don't get how this code works given that I can't find a directory named mongo-tools

for t in rewrittenTools:
installExternalBinary(env, "src/mongo-tools/" + t)

Comment by Mark Callaghan [ 14/Dec/14 ]

I think this is the relevant diff:

commit 4b033ae930afded6677c19022341241935992b33
Author: Benety Goh <benety@mongodb.com>
Date: Tue Oct 7 19:48:14 2014 -0400

SERVER-15547 removed legacy tools from source tree and build configuration. make use-new-tools option a no-op

Comment by Mark Callaghan [ 14/Dec/14 ]

For Mongo 2.6 I see this in src/mongo/SConscript

env.Install( '#/', [
env.Program( "mongofiles", ["tools/files.cpp", "tools/mongofiles_options_init.cpp"],
LIBDEPS=["alltools", "gridfs", "mongofiles_options"] ),
env.Program( "bsondump", ["tools/bsondump.cpp", "tools/bsondump_options_init.cpp"],
LIBDEPS=["alltools", "bsondump_options"]),
env.Program( "mongobridge", ["tools/bridge.cpp", "tools/mongobridge_options_init.cpp"],
LIBDEPS=["serveronly", "coreserver", "coredb", "mongobridge_options"] ),
env.Program( "mongoperf", "client/examples/mongoperf.cpp",
LIBDEPS=["serveronly", "coreserver", "coredb"] ),
] )

But that isn't in the file for 2.8. All I see is:

  1. tools
    rewrittenTools = [ "mongodump", "mongorestore", "mongoexport", "mongoimport", "mongostat", "mongotop", "bsondump", "mongofiles", "mongooplog" ]
Generated at Thu Feb 08 03:41:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.