LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices



Reply
 
Search this Thread
Old 11-23-2009, 07:46 AM   #1
nitinarora
LQ Newbie
 
Registered: Apr 2009
Posts: 19

Rep: Reputation: 0
Error while compiling ecryptfs utils : undefined reference to `PK11_ImportSymKey'


Hello All,


I am trying to cross compile ecryptfs utils for arm.
I am getting the below mentioned error.
After analysing the trace now I know that it needs mozilla NSS package for compilation.
I have tried to cross compile NSS for arm but without any success.
Please let me know if any one has faced such problem? Anyone who can suggest some solution?

../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_ImportSymKey'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_GetBestSlot'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_CreateContextBySymKey'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_HashBuf'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_ParamFromIV'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_CipherOp'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_FreeSymKey'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `NSS_NoDB_Init'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_DigestFinal'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_FreeSlot'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `SECITEM_FreeItem'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_DestroyContext'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PORT_GetError'

Thanks in advance
 
Old 11-23-2009, 01:04 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,283

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
All dependencies to build ecryptfs-utils are listed here
http://packages.debian.org/source/lenny/ecryptfs-utils

And a package , ecryptfs-utils for arm is here
http://packages.debian.org/stable/misc/ecryptfs-utils

There are about 10,000 packages for arm from Debian.

If you want to know, what your "make" errors means,
you will have to show the error result five lines
before the errors start and e.g. five lines after,
total ten lines, as an example.

Are you quite sure, that all libs used are cross compiled ?

It is advisable to tell which host you are using, like
CentOS 5.4 , Ubuntu 9.05 , Fedora 11.
Please tell the name of the Linux OS, every time,
a question is asked.
.....
 
Old 11-24-2009, 01:47 AM   #3
nitinarora
LQ Newbie
 
Registered: Apr 2009
Posts: 19

Original Poster
Rep: Reputation: 0
Rephrasing ............

I apologize for the same
Let me rephrase my question

My host PC: Fedora 8

I am sure that I have all cross compiled libraries except NSS.
These undefined references belong to NSS package libraries only.
Many libraries are built when we compile NSS for X86, libssl3, libsmime and libnss libraries are three of them and these APIs belong to them.

Now the I have two options either I cross compile complete NSS package
which I have tried without success.

Second is find a replacement for these APIs in ecryptfs utils, Replacement can be provided by some other cryptographic library, So I need guidance if anyone has faced such issue then he/she can guide me.



make[3]: Entering directory `/home/nitin/EncryptFS/eCryptFS-arm-pki/src/utils'
/bin/sh ../../libtool --tag=CC --mode=link arm_v6_vfp_le-gcc -I/home/nitin/EncryptFS/keyutils-1.2 -L/home/nitin/EncryptFS/keyutils-1.2 -o ecryptfs-manager ecryptfs_manager-manager.o ecryptfs_manager-io.o ecryptfs_manager-gen_key.o ../../src/libecryptfs/libecryptfs.la -lkeyutils -ldl
libtool: link: arm_v6_vfp_le-gcc -I/home/nitin/EncryptFS/keyutils-1.2 -o .libs/ecryptfs-manager ecryptfs_manager-manager.o ecryptfs_manager-io.o ecryptfs_manager-gen_key.o -L/home/nitin/EncryptFS/keyutils-1.2 ../../src/libecryptfs/.libs/libecryptfs.so -lkeyutils -ldl -Wl,-rpath -Wl,/home/nitin/EncryptFS/libs/lib
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_ImportSymKey'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_GetBestSlot'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_CreateContextBySymKey'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_HashBuf'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_ParamFromIV'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_CipherOp'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_FreeSymKey'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `NSS_NoDB_Init'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_DigestFinal'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_FreeSlot'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `SECITEM_FreeItem'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PK11_DestroyContext'
../../src/libecryptfs/.libs/libecryptfs.so: undefined reference to `PORT_GetError'
collect2: ld returned 1 exit status
make[3]: *** [ecryptfs-manager] Error 1
make[3]: Leaving directory `/home/nitin/EncryptFS/eCryptFS-arm-pki/src/utils'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/nitin/EncryptFS/eCryptFS-arm-pki/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nitin/EncryptFS/eCryptFS-arm-pki'
make: *** [all] Error 2

Thanks in Advance
 
Old 11-24-2009, 05:21 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,283

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
All the required "crypto" libs etc. are listed here
http://packages.debian.org/source/lenny/ecryptfs-utils

libgcrypt > libgcrypt11_1.4.1.orig.tar.gz
opencryptoki > opencryptoki_2.2.6+dfsg2.orig.tar.gz
libgpg-error > libgpg-error_1.4.orig.tar.gz
gpgme > gpgme1.0_1.1.6.orig.tar.gz
keyutils > keyutils_1.2.orig.tar.gz
pam > pam_1.0.1.orig.tar.gz
tspi > trousers_0.3.1.orig.tar.gz

No "mozilla NSS package" seems necessary.
.....
And you may get a pointer from the Debian
source / patch > rules showing these options ..
Code:
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --libdir=\$${prefix}/lib --mandir=\$${prefix}/share/man --enable-static --enable-gpg --disable-gui --enable-pam --disable-openssl --disable-pkcs11-helper --disable-tspi
It is always a good idea looking into the Debian files :
They are for arm ! Did you try out the package ? ?
Can be unpacked with ' ar -x <package>.deb '
.....

Last edited by knudfl; 11-24-2009 at 06:05 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
undefined reference to `yywrap' compiling PAM Mahonri Debian 5 12-30-2011 07:00 PM
PGPlot in 'C' compiling: undefined reference to `MAIN_` (ubuntu 8.10) SuperNomad Programming 3 02-28-2009 01:33 PM
Several "undefined reference to" error when compiling a C programm acer_peri Programming 8 12-11-2008 06:45 AM
Undefined reference to WxGtk libraries when compiling Xchm Darwish Linux - Software 0 09-04-2005 12:11 AM
undefined reference to `cfb_fillrect' and more when compiling kernel KR-data Linux - Software 0 09-03-2005 02:56 PM


All times are GMT -5. The time now is 01:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration