Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 5:02 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Sep 03, 2012 1:03 pm 
Offline

Joined: Mon Sep 03, 2012 12:34 pm
Posts: 4
hello!

i'm trying to compile ykchalresp statically for a custom initramfs, so no dependencies from the executable to libs.

for some reason i do not succeed.
ykchalresp always links to some libs:
Code:
ldd ykchalresp
   linux-vdso.so.1 (0x00007fff2b1e0000)
   libyubikey.so.0 => /usr/lib64/libyubikey.so.0 (0x00007fe71fa0e000)
   libusb-1.0.so.0 => /usr/lib64/libusb-1.0.so.0 (0x00007fe71f7fe000)
   libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe71f5e1000)
   libc.so.6 => /lib64/libc.so.6 (0x00007fe71f237000)
   librt.so.1 => /lib64/librt.so.1 (0x00007fe71f02e000)
   /lib64/ld-linux-x86-64.so.2 (0x00007fe71fc11000)


what i did was, checkout the code from github, run autoscan, autoconf, autoreconf and:
Code:
./configure --enable-static
make


can anyone point me in the right direction? i don't know what i'm missing.

thx


Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

PostPosted: Mon Sep 03, 2012 1:31 pm 
Offline
Site Admin
Site Admin

Joined: Thu Apr 19, 2012 1:45 pm
Posts: 148
Hello,

The --enable-static is telling libtool to build static binaries along the shared ones, doesn't have any effect on executables.

It's a bit fiddly to get libtool to build the executables statically, this seems to work for me with libusb-0.1, libusb-1.0 breaks.

$ ./configure && make LDFLAGS=-all-static


/klas


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 03, 2012 2:40 pm 
Offline

Joined: Mon Sep 03, 2012 12:34 pm
Posts: 4
how do you select libusb 0.1 to be used?

-with-backend=libusb

does not seem to work for me.
also i tried editing the Makefile

does not work either...

thx


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 04, 2012 7:03 am 
Offline
Site Admin
Site Admin

Joined: Thu Apr 19, 2012 1:45 pm
Posts: 148
--with-backend=libusb to configure works for me. What output do you get from the configure checks? and what platform are you running on?

/klas


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 04, 2012 8:42 am 
Offline

Joined: Mon Sep 03, 2012 12:34 pm
Posts: 4
i'm running gentoo linux.

it looks like i'm missing libusb 0.1 although i have the libusb-compat package installed.
this does not seem to suffice.

i already posted a forum question in the gentoo forums as well.

thx


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 04, 2012 9:24 am 
Offline

Joined: Mon Sep 03, 2012 12:34 pm
Posts: 4
i tried it on a ubuntu machine now.
it worked.

thx for your help!

for the record:
i had to install libusb-dev and libyubikey-dev on the ubuntu machine. that's all.
then run:
./configure --with-backend=libusb
make LDFLAGS=-all-static

done


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group