LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-16-2011, 06:06 AM   #1
sheelavantar
Member
 
Registered: Aug 2010
Posts: 69

Rep: Reputation: 1
Dynamic Library Creation Failed.


Hi,
I am trying to cross compile openldap-2.4.26 using the following command for MIPS.

./configure --host=mips CC=/opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-gcc LD=/opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-ld LDFLAGS=-Bshareable CPPFLAGS="-I/product/wibro/premium/src/APP/Protocols/ASNGW/vijay/db-4.8.26/build_unix" AR=/opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-ar RANLIB=/opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-ranlib NM=/opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-nm STRIP=/opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-strip OBJDUMP=/opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-objdump --enable-dynamic=yes AS=/opt/montavista/pro/devkit/mips/fp_be/bin/mips_fp_be-as --enable-shared=yes --with-yielding_select=no

The configuration and make is going well, but at the end it is not creating the required dynamic libraries.only static libraries are getting created.

I have observed the following points during configuration

checking whether a program can dlopen itself... cross
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes

I tried to enable dynamic library creation by giving option --enable-shared=yes. But it didn't work out.

please help me how can i solve this problem.

Last edited by sheelavantar; 09-16-2011 at 06:13 AM.
 
Old 09-16-2011, 09:39 AM   #2
jason_not
Member
 
Registered: Aug 2010
Location: Beaverton, Oregon, USA
Distribution: Pfsense, Ubuntu, Centos, Fedora, Redhat, Scientfic, MacOS
Posts: 76

Rep: Reputation: 19
I once tried to implement a cross compiler. It's a very hairy problem.

If I had to guess, I think it is because the dynamic libraries that gcc and ld would link against are for the local platform. I think you would need the entire installed library base of the mips platform available in order to link against it.

You might(!) be able to fake it by nfs mounting a running mips platform, but now we are beyond my understanding.

--jason
 
Old 09-18-2011, 08:34 PM   #3
sheelavantar
Member
 
Registered: Aug 2010
Posts: 69

Original Poster
Rep: Reputation: 1
The Compiler and all the MIPS related compilation environment is in clear case, it is already checked in. I have to just use this and build my openldap libraries and image.

Now I am not understanding why mips_fp_be-gcc and mips_fp_be-ld are not able to create shared libraries..

why the configuration says as follows?

checking whether a program can dlopen itself... cross
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes


How can it be resolved?? please suggest me some solution.
 
Old 09-19-2011, 12:31 AM   #4
jason_not
Member
 
Registered: Aug 2010
Location: Beaverton, Oregon, USA
Distribution: Pfsense, Ubuntu, Centos, Fedora, Redhat, Scientfic, MacOS
Posts: 76

Rep: Reputation: 19
Hello Sheelavantar,

I don't have a definitive answer for you. I recommend you check gnu's websites for gcc and libtool. I think you will find more information at the following sites' forums/mailing lists.

https://www.gnu.org/s/libtool/manual/libtool.html
http://gcc.gnu.org/

--jason
 
Old 09-19-2011, 04:07 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,660

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
I'd guess, you will have to use a libtool script meant for MIPS.
Your "/usr/bin/libtool" is probably all i586 ?

Example 'libtool' for mips http://packages.debian.org/lenny/libtool
>>> http://ftp.de.debian.org/debian/pool...enny1_mips.deb
> libtool_1.5.26-4+lenny1_mips.deb
( Can be unpacked with : ar -x <.deb> ).

..
 
  


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
Dynamic Array Creation in c++/linux. Raghu140 Programming 16 04-06-2010 09:36 AM
dynamic struct creation in c PatrickNew Programming 3 03-27-2007 06:10 AM
LINUX - linking archive (static library) with shared (dynamic) library gurkama Programming 5 03-04-2007 11:11 PM
Dynamic creation of Objects in C++ poeta_boy Programming 9 08-02-2004 01:58 PM


All times are GMT -5. The time now is 04:46 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration