Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contrail 3.2 build failing with **scons: building terminated because of errors.2017-04-16 17:31:54 //lib/x86_64-linux-gnu/libssl.so.1.0.0: error adding symbols: DSO missing from command line.collect2: error: ld returned 1 exit status #144

Open
Pavaniaddanki opened this issue Apr 16, 2017 · 20 comments

Comments

@Pavaniaddanki
Copy link

Hi All,
I am building Contrail 3.2 and getting the below error: Can anyone give a clue how to resolve this error.

2017-04-16 17:31:53 g++ -o build/production/analytics/vizd -Wl,--whole-archive -lbase -lcpuinfo -lprocess_info -lnodeinfo -l:librdkafka.a -l:librdkafka++.a -Wl,--no-whole-archive -g build/production/analytics/collector_uve_types.o build/production/analytics/collector_uve_constants.o build/production/analytics/collector_uve_html.o build/production/analytics/analytics_types.o build/production/analytics/analytics_constants.o build/production/analytics/analytics_html.o build/production/analytics/redis_types.o build/production/analytics/redis_constants.o build/production/analytics/redis_html.o build/production/analytics/uflow_types.o build/production/analytics/uflow_constants.o build/production/analytics/uflow_html.o build/production/analytics/sflow_types.o build/production/analytics/sflow_constants.o build/production/analytics/sflow_html.o build/production/analytics/viz_types.o build/production/analytics/viz_constants.o build/production/analytics/viz_html.o build/production/analytics/viz_collector.o build/production/analytics/ruleeng.o build/production/analytics/collector.o build/production/analytics/vizd_table_desc.o build/production/analytics/viz_message.o build/production/analytics/generator.o build/production/analytics/redis_connection.o build/production/analytics/redis_processor_vizd.o build/production/analytics/options.o build/production/analytics/stat_walker.o build/production/analytics/protobuf_collector.o build/production/analytics/protobuf_server.o build/production/analytics/sandesh_request.o build/production/analytics/sflow.o build/production/analytics/sflow_generator.o build/production/analytics/sflow_collector.o build/production/analytics/usrdef_counters.o build/production/analytics/sflow_parser.o build/production/analytics/ipfix_collector.o build/production/analytics/protobuf_schema.pb.o build/production/analytics/main.o build/production/analytics/buildinfo.o build/production/analytics/db_handler.o build/production/analytics/OpServerProxy.o build/production/analytics/syslog_collector.o build/production/analytics/parser_util.o -Lbuild/lib -Lbuild/production/sandesh -Lcontroller/src/sandesh -Lbuild/production/analytics/ruleparser -Lcontroller/src/analytics/ruleparser -Lbuild/production/discovery/client -Lcontroller/src/discovery/client -Lbuild/production/http/client -Lcontroller/src/http/client -Lbuild/production/xml -Lcontroller/src/xml -Lbuild/production/database -Lcontroller/src/database -Lbuild/production/base -Lcontroller/src/base -Lbuild/production/io -Lcontroller/src/io -Lbuild/production/net -Lcontroller/src/net -lcassandra_cql -lcassandra -lgendb -lboost_regex -lcpuinfo -lds -lio -lsandesh -lhttpc -lhttp -lvncapi -lhttp_parser -lcurl -lruleparser -lxml -lprocess_info -lnodeinfo -lbase -lio -lz -lnet -lipfix -lmisc -lsandeshvns -lpugixml -lhiredis -lprotobuf -lzookeeper_client -lzookeeper_mt -lboost_filesystem -lboost_program_options -lboost_system -llog4cplus -lpthread -ltbb -lboost_python -lpython2.7 -lrt2017-04-16 17:31:54 /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/librdkafka.a(rdkafka_transport.o): undefined reference to symbol 'SSL_get_verify_result@@OPENSSL_1.0.0'2017-04-16 17:31:54 scons: building terminated because of errors.2017-04-16 17:31:54 //lib/x86_64-linux-gnu/libssl.so.1.0.0: error adding symbols: DSO missing from command line2017-04-16 17:31:54 collect2: error: ld returned 1 exit status2017-04-16 17:31:54 scons: *** [build/production/analytics/vizd] Error 1ubuntu@ubuntu:~/contrail-installer$ 2017-04-16 17:31:55 ++ ret_val=22017-04-16 17:31:55 exited with status :22017-04-16 17:31:55 ++ [[ 2 -ne 0 ]]2017-04-16 17:31:55 ++ exit 22017-04-16 17:31:55 ++ clean2017-04-16 17:31:55 ++ local r=22017-04-16 17:31:55 ++ echo 'exited with status :2'2017-04-16 17:31:55 ++ exit 2

Thanks and Regards,
Pavani Addanki

@pavaniaddankitcs
Copy link

Did anyone face this issue and how did you resolve. Please help

@sureshkvl
Copy link

sureshkvl commented Apr 26, 2017

I faced this issue, and resolved it. Its kafka library linking issue.
confluentinc/librdkafka#1106

solution:
Include the "ssl crypto pthread" in the analytics scons linking section

@sbilly
Copy link

sbilly commented May 2, 2017

This works for me. thx to @sureshkvl

sudo apt-get install libssl-dev libsasl2-dev liblz4-dev

vi controller/src/analytics/SConscript

Modify as below:

if sys.platform != 'darwin':
    AnalyticsEnv.Prepend(LINKFLAGS =
                         ['-Wl,--whole-archive',
                          '-lbase', '-lcpuinfo',
                          '-lprocess_info', '-lnodeinfo',
                          '-l:librdkafka.a', '-l:librdkafka++.a','-lssl', '-lcrypto', '-lpthread',
                          '-Wl,--no-whole-archive'])

@pavaniaddankitcs
Copy link

I resolved the issue. By adding ssl and lcrypto in SConscript. Thank you.

@amandeepsingh91
Copy link

I resolved the issue. By adding sasl2 in SConscript.

@tmonguillon
Copy link

amandeepsingh91 > You're right. The analytics/SConscript file from the contrail-controller contains a curious test which not includes the sasl2 lib for the Ubuntu platform only. But this lib is a required dependency for librdkafka (librdkafka1 package) which is used to build some components of the contrail-contoller.

I fix this with the following patch :

--- SConscript.orig     2017-08-30 14:42:13.728323999 +0000
+++ SConscript          2017-08-31 07:23:00.628323999 +0000
@@ -60,13 +60,10 @@
         'zookeeper_mt',
         'ssl',
         'crypto',
+        'sasl2',
         'boost_filesystem',
         'boost_program_options'])
 
-(PLATFORM, VERSION, EXTRA) = platform.linux_distribution()
-if PLATFORM.lower() != 'ubuntu':
-    AnalyticsEnv.Prepend(LIBS=['sasl2'])
-
 database_libs = ['cassandra_cql', 'cassandra']
 
 database_libs.append('gendb')

@sureshkvl
Copy link

we have to add 'ldl' flag also.

@adnaniqbal
Copy link

@sureshkvl where exactly do I have to add 'ldl' flag?

@sureshkvl
Copy link

sureshkvl commented Oct 18, 2017

if sys.platform != 'darwin':
AnalyticsEnv.Prepend(LINKFLAGS =
['-Wl,--whole-archive',
'-lbase', '-lcpuinfo',
'-lprocess_info', '-lnodeinfo',
'-l:librdkafka.a', '-l:librdkafka++.a','-lssl', '-lcrypto', '-lpthread','-ldl',
'-Wl,--no-whole-archive'])

@adnaniqbal
Copy link

@sureshkvl thanks a lot. I was able to do a scuccesful contrail install using release 4.0 over ubuntu 14.04 without having this problem. There were other issues but minor.

@amandeepsingh91
Copy link

@adnaniqbal could you please share your localrc and steps you performed. i am unable to install successfully.

@adnaniqbal
Copy link

I used following configuration:
Ubuntu 14.04, Contrail Release 4.0

Local rc is given below:
-----------------------------START--------------------------------------------------------
#For LOG_LEVEL 3 stdout and xtrace into logfile,console.

LOG_LEVEL=3

SERVICE_TIMEOUT=180
SERVICE_HOST=localhost

#use only when INSTALL_PROFILE=COMPUTE, provide IP of compute node
#COMPUTE_HOST_IP=

INSTALL_PROFILE=ALL
PHYSICAL_INTERFACE=eth0

to get source code make it as False

CONTRAIL_DEFAULT_INSTALL=False

default branch is master

CONTRAIL_BRANCH=R4.0

to get the ppa packages uncomment

LAUNCHPAD_BRANCH=r2.20

repo proto is https or (default) ssh. Leave commented for ssh

CONTRAIL_REPO_PROTO=https

proto for openstack bits. Use HTTPS if git is firewalled

GIT_BASE=https://github.com

CASS_MAX_HEAP_SIZE=500M
CASS_HEAP_NEWSIZE=100M

number of jobs used to build

NB_JOBS=1

target of the build debug/production

TARGET=production

CONTRAIL_VGW_INTERFACE=vgw
CONTRAIL_VGW_PUBLIC_SUBNET=11.0.0.0/24
CONTRAIL_VGW_PUBLIC_NETWORK=default-domain:demo:net:net
-------------------------------END------------------------------------------------------

I am currently doing install using this localrc and have completed build step successfully (install in progress.) I did encounter issues related to SConscript which were corrected using edits given above in this thread.

@amandeepsingh91
Copy link

@adnaniqbal thanks.. i installed contrail but facing issues in openstack installation. Are you using single node or multi-node environment?

@adnaniqbal
Copy link

adnaniqbal commented Oct 26, 2017 via email

@adnaniqbal
Copy link

adnaniqbal commented Oct 31, 2017 via email

@amandeepsingh91
Copy link

@adnaniqbal no i am not able to install successfully, i also posted kinda same issue #156

@amandeepsingh91
Copy link

@adnaniqbal now i am using devstack environment where i am able to bring up openstack and contrail but some service like nodemgr are failing. i am working on them.

@adnaniqbal
Copy link

adnaniqbal commented Oct 31, 2017 via email

@amandeepsingh91
Copy link

@adnaniqbal are you able to install ?

@adnaniqbal
Copy link

adnaniqbal commented Nov 9, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants