|
From: David C. <dcc...@ac...> - 2013-06-13 15:28:50
|
Please don't top-post.
On 6/13/2013 12:26 AM, Sanjay Kumar (sanjaku5) wrote:
> Hi David,
>
> Below is final link command, printing at time linking, Please comments.
> Thanks,
> Sanjay
>
>
> <snip>
>
> /auto/mitg-sw/tools/bintools/rhel-x86_64/gcc/201203161400/bin/g++ -m32 -L /auto/mitg-sw/tools/bintools/rhel-x86_64/gcc/201203161400/lib --static -O0 -DFSM_STAT
The "--static" here is most likely the problem. The g++ option for
static linking is actually called "-static" (only one dash in front) but
it looks like g++ is interpreting the two dashes as if they were one.
> -DHAS_AF_PACKET ./base_instance.o ./configfile.o ./config.o ./logging.o ./message_buffer.o ./timer.o ./ip_entity.o ./ip_container.o ./pcap_filter.o ./cfgdata.o ./ikev2_cfgdata.o ./cfgparams.o ./main.o ./flare_app.o ./load_app.o ./cli.o ./statistics.o ./sgsn.o ./sgsn_ipv4_addr.o ./user.o ./user_entity.o ./user_cfgparams.o ./gmm.o ./gmm_entity.o ./gmm_cfgparams.o ./nas_common.o ./aes.o ./mac_md5.o ./snow_3g.o ./uia2.o ./uea2.o ./snx_sha256.o ./NasSecurity.o ./esm.o ./esm_entity.o ./esm_cfgparams.o ./emm.o ./emm_entity.o ./emm_cfgparams.o ./smc.o ./smc_entity.o ./smc_cfgparams.o ./smr.o ./smr_entity.o ./smr_cfgparams.o ./smtl.o ./smtl_entity.o ./smtl_cfgparams.o ./sm.o ./sm_entity.o ./sm_cfgparams.o ./sndcp.o ./sndcp_entity.o ./sndcp_cfgparams.o ./gea1.o ./gea2.o ./gea3.o ./llc.o ./llc_entity.o ./llc_cfgparams.o ./bssgp.o ./bssgp_entity.o ./bssgp_cfgparams.o ./ns.o ./ns_entity.o ./ns_cfgparams.o ./nsvc_entity.o ./m3ua.o ./m3ua_entity.o ./m3ua_cfgparams.o ./m3ua_transport_entity.o ./ns_ip_entity.o ./gtpcv0.o ./gtpcv0_entity.o ./gtpcv0_cfgparams.o ./gtpcv1.o ./gtpcv1_entity.o ./gtpcv1_cfgparams.o ./gtpcv2.o ./gtpcv2_entity.o ./gtpcv2_cfgparams.o ./gtpu_entity.o ./gtpu.o ./gtpu_cfgparams.o ./ranap_entity.o ./ranap.o ./ranap_cfgparams.o ./S1apMsgs.o ./s1ap.o ./s1ap_entity.o ./s1ap_cfgparams.o ./sccp_entity.o ./sccp.o ./sccp_cfgparams.o ./mapss7.o ./mapss7_entity.o ./mapss7_cfgparams.o ./cap.o ./cap_entity.o ./cap_cfgparams.o ./tcap.o ./tcap_entity.o ./tcap_cfgparams.o ./diameter.o ./diameter_entity.o ./diameter_cfgparams.o ./radius.o ./radius_entity.o ./radius_cfgparams.o ./ikev2.o ./ikev2_entity.o ./ikev2_entity_responder.o ./ikev2_entity_informational.o ./ikev2_entity_child.o ./ikev2_cfgparams.o ./ikev2_payload.o ./ikev2_crypto.o ./aka.o ./ikev2_eap_common.o ./ikev2_eap_aka.o ./ikev2_eap_sim.o ./ipsec_data.o ./ipsec_data_cfgparams.o ./ipsec_data_entity.o ./ipse
> c_esp_entity.o ./sha1.o ./sha1-internal.o ./xfrm.o ./xfrm_entity.o ./xfrm_load_entity.o ./xfrm_cfgparams.o ./xfrm_message.o ./bssap.o ./bssap_entity.o ./bssap_cfgparams.o ./traffic.o ./tlv.o ./gx.o ./asn.o ./stargen.o ./eventbridge.o ./CliAttrib.o ./CliObject.o ./CliCommand.o ./CliObjectSyfer.o ./CliObjectSyferCard.o ./CliObjectEth.o ./CliHandlerServer.o ./CliHandlerServerSyfer.o ./libs/librohc.a ../../framework//cli/libs/glib-2.0.0/lib/libglib-2.0.a ./libs/libsnutils.a ./libs/libcommon.a ./libs/libasnbase.a ./libs/libs1apgen.a ./libs/libsctp.a ./libs/libpcap.a -L . -L ../syfer_ssl/openssl-0.9.8g/ -L../../framework//eventbridge -lssp -lsyfer_ssl -lcrypto -leventbridge -ldl -o flare
> ./libs/libpcap.a(nametoaddr.o): In function `pcap_nametoaddrinfo':
> nametoaddr.c:(.text+0xa3): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
> ./libs/libpcap.a(nametoaddr.o): In function `pcap_nametoaddr':
> nametoaddr.c:(.text+0x1a): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
> ./libs/libpcap.a(nametoaddr.o): In function `pcap_nametonetaddr':
> nametoaddr.c:(.text+0xdb): warning: Using 'getnetbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
> ./libs/libpcap.a(nametoaddr.o): In function `pcap_nametoproto':
> nametoaddr.c:(.text+0x2cb): warning: Using 'getprotobyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
> ./libs/libpcap.a(nametoaddr.o): In function `pcap_nametoport':
> nametoaddr.c:(.text+0x12f): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
And of course these warnings indicate that your application is being
linked statically, as Philippe suggested earlier. Unless this is an
embedded application, you generally won't want to link statically, and I
wonder why it was done.
To run Valgrind, it will be simpler if you turn this off for debugging.
If you aren't allowed to do make that kind of change to the Makefile
structure even when debugging, you will need to follow the directions
pointed out by Philippe (which I have never used; my applications are
dynamically linked).
--
David Chapman dcc...@ac...
Chapman Consulting -- San Jose, CA
Software Development Done Right.
www.chapman-consulting-sj.com
|