SH SHin
2018-04-23 18:40:27 UTC
Hi,
I have already included my new library libtto.so in /usr/lib and libtto.h
in /usr/include.
After modifying some part of codes to utilize the functions included in
libtto, I tried scons -j16 all, and what I saw was this.
src/mongo/db/ftdc/controller.cpp:154: error: undefined reference to
'tto_get_bg_task()'
src/mongo/db/ftdc/controller.cpp:212: error: undefined reference to
'tto_begin(unsigned long)'
src/mongo/db/ftdc/controller.cpp:222: error: undefined reference to
'tto_end(unsigned long)'
src/mongo/db/instance.cpp:237: error: undefined reference to
'tto_begin(unsigned long)'
src/mongo/db/instance.cpp:256: error: undefined reference to
'tto_end(unsigned long)'
src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp:106: error:
undefined reference to 'taio_begin(unsigned long)'
src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp:111: error:
undefined reference to 'taio_begin(unsigned long)'
collect2: error: ld returned 1 exit status
scons: *** [build/opt/mongo/db/exec/sort_test] Error 1
What I have tried so far is, (library hwloc is required for libtto)
in src/mongo/SConscript,
.
.
.
env.Append(LIBPATH=['tto'])
env.Append(LIBPATH=['hwloc'])
env.Append(LIBPATH=['/usr/lib'])
env.Append(CPPPATH=['tto'])
env.Append(CPPPATH=['hwloc'])
env.Append(CPPPATH=['/usr/include'])
.
.
.
mongod = env.Program(
target="mongod",
source=[
"db/db.cpp",
"db/mongod_options_init.cpp",
],
LIBDEPS=mongodLibDeps,
SYSLIBDEPS=[
"tto",
"hwloc",
],
)
.
.
.
env.Library(
target='base',
source=baseSource,
LIBDEPS=baseLibDeps,
SYSLIBDEPS=[
"tto",
"hwloc"
],
)
.
.
in src/third_party/wiredtiger/SConstruct
.
.
conf = Configure(env)
conf.env.Append(LIBPATH=['tto'])
conf.env.Append(LIBPATH=['hwloc'])
conf.env.Append(CPPPATH=['tto'])
conf.env.Append(CPPPATH=['hwloc'])
.
.
in src/third_party/wiredtiger/SConscript
.
.
env.Append(LIBPATH=['tat'])
env.Append(LIBPATH=['hwloc'])
env.Append(LIBPATH=['/usr/lib'])
env.Append(CPPPATH=['tto'])
env.Append(CPPPATH=['hwloc'])
env.Append(CPPPATH=['/usr/include'])
baseLibDeps=[
..
.
wtlib = env.Library(
target='wiredtiger,
source=wtsources,
LIBDEPS=[
'$BUILD_DIR/third_party/shim_snappy',
'$BUILD_DIR/third_party/shim_zlib',
],
SYSLIBDEPS=[
"tto",
"hwloc"
],
)
.
.
.
And also tried similar modification on the top SConscript but always same
result as shown above.
Is there any more modification that I should put in to let scons recognize
my new library??
I've been stuck with this problem for several days and no progress....
I have already included my new library libtto.so in /usr/lib and libtto.h
in /usr/include.
After modifying some part of codes to utilize the functions included in
libtto, I tried scons -j16 all, and what I saw was this.
src/mongo/db/ftdc/controller.cpp:154: error: undefined reference to
'tto_get_bg_task()'
src/mongo/db/ftdc/controller.cpp:212: error: undefined reference to
'tto_begin(unsigned long)'
src/mongo/db/ftdc/controller.cpp:222: error: undefined reference to
'tto_end(unsigned long)'
src/mongo/db/instance.cpp:237: error: undefined reference to
'tto_begin(unsigned long)'
src/mongo/db/instance.cpp:256: error: undefined reference to
'tto_end(unsigned long)'
src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp:106: error:
undefined reference to 'taio_begin(unsigned long)'
src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp:111: error:
undefined reference to 'taio_begin(unsigned long)'
collect2: error: ld returned 1 exit status
scons: *** [build/opt/mongo/db/exec/sort_test] Error 1
What I have tried so far is, (library hwloc is required for libtto)
in src/mongo/SConscript,
.
.
.
env.Append(LIBPATH=['tto'])
env.Append(LIBPATH=['hwloc'])
env.Append(LIBPATH=['/usr/lib'])
env.Append(CPPPATH=['tto'])
env.Append(CPPPATH=['hwloc'])
env.Append(CPPPATH=['/usr/include'])
.
.
.
mongod = env.Program(
target="mongod",
source=[
"db/db.cpp",
"db/mongod_options_init.cpp",
],
LIBDEPS=mongodLibDeps,
SYSLIBDEPS=[
"tto",
"hwloc",
],
)
.
.
.
env.Library(
target='base',
source=baseSource,
LIBDEPS=baseLibDeps,
SYSLIBDEPS=[
"tto",
"hwloc"
],
)
.
.
in src/third_party/wiredtiger/SConstruct
.
.
conf = Configure(env)
conf.env.Append(LIBPATH=['tto'])
conf.env.Append(LIBPATH=['hwloc'])
conf.env.Append(CPPPATH=['tto'])
conf.env.Append(CPPPATH=['hwloc'])
.
.
in src/third_party/wiredtiger/SConscript
.
.
env.Append(LIBPATH=['tat'])
env.Append(LIBPATH=['hwloc'])
env.Append(LIBPATH=['/usr/lib'])
env.Append(CPPPATH=['tto'])
env.Append(CPPPATH=['hwloc'])
env.Append(CPPPATH=['/usr/include'])
baseLibDeps=[
..
.
wtlib = env.Library(
target='wiredtiger,
source=wtsources,
LIBDEPS=[
'$BUILD_DIR/third_party/shim_snappy',
'$BUILD_DIR/third_party/shim_zlib',
],
SYSLIBDEPS=[
"tto",
"hwloc"
],
)
.
.
.
And also tried similar modification on the top SConscript but always same
result as shown above.
Is there any more modification that I should put in to let scons recognize
my new library??
I've been stuck with this problem for several days and no progress....
--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-dev+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-dev/16c9deee-6df9-4033-8c41-a966260453c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-dev+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-dev/16c9deee-6df9-4033-8c41-a966260453c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.