/bin/sed: can't read /usr/lib/libgmp.la: No such file or directory

1,469 views
Skip to first unread message

xkcdcode

unread,
Aug 9, 2012, 12:27:22 PM8/9/12
to libfen...@googlegroups.com
Hi,

I am trying to compile libfenc on a 64-bit Ubuntu 12.04 machine. I am getting the following error on the make command

/bin/sed: can't read /usr/lib/libgmp.la: No such file or directory
libtool: link: `/usr/lib/libgmp.la' is not a valid libtool archive
make[2]: *** [libfenc.la] Error 1

The libgmp.la file is not on the system at all but the libgmp-dev package is installed. Furthermore, I don't have this problem on 32-bit systems. Any clues on how to fix this?

Michael Rushanan

unread,
Aug 9, 2012, 1:31:20 PM8/9/12
to xkcd...@gmail.com, libfen...@googlegroups.com
Good Afternoon,

Have you taken a look at the INSTALL documentation, specifically for
building on multi-architecture CPUs?

If I recall correctly, Ubuntu-64 bit doesn't differentiate 64bit libs
like other linux distros. For instance, Fedora has a /usr/lib64/.
That's where libtool comes in, it is looking for the gmp.la to tell it
some details about the lib (e.g. location that is arch specific)...
but libtool obviously isn't finding that.

Now, this probably shouldn't be the solution, but under a mislabeled
piece of the INSTALL documentation there is mention of linux 64 bit
problems. I recommend checking ldconfig -p | grep gmp and see what
comes up. If nothing, even if something, I recommend doing a sudo
ldconfig, and attempting the configure/build again.

If this fails out, please shoot us another email with the conf.status
and full error details. I might add, in closing, that we have not
touched this code in a while so I apologize for my brevity in this
response.

Thanks!
Mike
--
- - -
Michael A. Rushanan
Johns Hopkins University
Computer Science, PhD Candidate
President of Upsilon Pi Epsilon

xkcdcode

unread,
Aug 10, 2012, 8:28:46 AM8/10/12
to libfen...@googlegroups.com, xkcd...@gmail.com
Hi Micheal,

Thanks a lot for your quick response :)

I've managed to solve the problem on 64-bit Ubuntu but it was not straight forward, spent the whole day striking by head on it. I'll explain in a little detail here so that others facing the same issue may benefit. Basically 3 things had to be done

1. Don't run ./configure with the ABI=64 option as mentioned in the INSTALL doc. It couldn't find libm even though its there and the LDFLAGS options etc. also didn't help. Just plain ./configure with no options worked

2. Got the libgmp.la file in the system by install the lib32gmp-dev package but had a new problem; it was installed in /usr/lib32/ by the system and make couldn't find it, so included this folder in LDFLAGS and CPPFLAGS. Got a different error now that libgmp.so has unrecognised symbols, basically make was using the libgmp.so from /usr/lib32/ and not from /usr/lib/x86_64-linux-gnu/ as it should. So removed the *FLAGS from configure step and added a symbolic link to libgmp.la in /usr/lib/x86_64-linux-gnu/ and /usr/lib/ both. After that the make worked, but also had to install gcc-multilib and g++-multilib.

3. When actually using the software, got the error "Could not open d224.param parameters file" on the abe-setup -m CP command. Wasted a lot of time on thinking about generating Diffie-Hellman parameters before trying to find this file in the fenc directory and viola it was there :). So copying it to the current working dir worked.

So that's it, hopefully it will be helpful for you guys as well. Awesome work by the way and a godsend for people like me who don't understand PBC and still want to use Identity Based Encryption and CP-ABE :). Thanks lot for your help as well.

Cheers,
xkcdcode

P.S. Can you please let me know of you have come across a good IBE library in Java in your travels. So far I've only found jPBC (http://gas.dia.unisa.it/projects/jpbc/) but its incomplete (decryption is not implemented for some reason).

Michael Rushanan

unread,
Aug 11, 2012, 1:26:36 PM8/11/12
to libfen...@googlegroups.com
Cool - thanks for the detailed explanation and I'll be sure to add
that to the INSTALL document. However, I must admit that we have not
put much attention into libfenc as of late due to the deprecation of
this project. Specifically, we have been working on a python module,
called Charm, that provides a robust cryptographic framework for
rapidly modifying cryptographic schemes. We accomplish the "easy"
part by abstracting details of complex algorithms, i.e. elliptic
curves, and providing a nice API.

The originator, Ayo Akinyele, has also finished up (on the dev branch)
an embedding API that allows you to use Charm in C/C++. I highly
suggest you should check it out ;).

https://github.com/JHUISI/charm

http://www.charm-crypto.com/Main.html

-Mike
Reply all
Reply to author
Forward
0 new messages