C sample app make fails on 64 bit Ubuntu

Document created by cdnadmin on Jan 25, 2014
Version 1Show Document
  • View in full screen mode
This document was generated from CDN thread

Created by: William Watters on 22-09-2013 08:33:13 PM
I have installed the 64 bit C SDK but am running into issues when running 'make' for the sample apps.

make -C HelloNetwork
make[1]: Entering directory `/opt/cisco/onep/c64/sdk-c64-1.0.0.84/c/sample-apps/HelloNetwork'
Building target: bin/HelloNetwork
Invoking: GCC C Linker -L/opt/cisco/onep/c64/sdk-c64-1.0.0.84/c/lib  -lonep32_core -lrt  -m32 -pie
cc -o bin/HelloNetwork \ 
      obj/HelloNetwork.o -m32 -pie -L/opt/cisco/onep/c64/sdk-c64-1.0.0.84/c/lib  -lonep32_core -lrt
 /usr/bin/ld: cannot find -lonep32_core
collect2: ld returned 1 exit status
make[1]: *** [bin/HelloNetwork] Error 1
make[1]: Leaving directory `/opt/cisco/onep/c64/sdk-c64-1.0.0.84/c/sample-apps/HelloNetwork'
make: ***  Error 2

It appears that it is trying to compile using 32 bit files which it can't find. I manuipulated the make file to use 64 bit.
And i got the follwoing output

Building target: bin/HelloNetwork
Invoking: GCC C Linker -L/opt/cisco/onep/c64/sdk-c64-1.0.0.84/c/lib  -lonep64_core -lrt  -m64 -pie
cc -o bin/HelloNetwork \ 
      obj/HelloNetwork.o -m64 -pie -L/opt/cisco/onep/c64/sdk-c64-1.0.0.84/c/lib  -lonep64_core -lrt
 /usr/bin/ld: i386 architecture of input file `obj/HelloNetwork.o' is incompatible with i386:x86-64 output
collect2: ld returned 1 exit status
make: *** [bin/HelloNetwork] Error 1

It is now using the 64bit files from the SDK but it is incompatible.

Any insight on what i might have done incorrectly or suggestions on helping me resolve this?

Thanks

Jim

Subject: RE: C sample app make fails on 64 bit Ubuntu
Replied by: Karen Cadora on 22-09-2013 09:55:07 PM
Hi, Jim.

Can you try "make clean" and then "make LBITS=64" with the original Makefile?  If that doesn't work, then the output of "uname -a" would be a good starting point to understand what's happening.

Thanks,
Shelly

Subject: RE: C sample app make fails on 64 bit Ubuntu
Replied by: William Watters on 23-09-2013 12:22:34 AM
Thank you Shelly,

That clear up the problems with make.

Jim

Attachments

    Outcomes