LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 06-16-2012, 10:28 AM   #1
martvefun
Member
 
Registered: Apr 2010
Location: Belgium
Distribution: Archlinux
Posts: 53

Rep: Reputation: 1
Exclamation [make] Build ipvsadm, libpopt.so: file not recognized


Hello,

I am trying to compile the firmware of my DLink wireless camera on my computer from the sources (got from the DLink website). The device is an ARMv5 system and my computer uses Archlinux x86_64. In the source archive, there was mv_pro_5.0 (from MontaVista) which ships an ARM compiler added to the $PATH.

While building the software, (using the provided makefile), it fails while building the app ipvsadm (in the subdirectory apps/public/ipvsadm-1.24/, makefile). The error is the following :

Code:
$ arm_v5t_le-gcc -Wall -Wunused -Wstrict-prototypes -g -O2 -o ipvsadm ipvsadm.o config_stream.o dynamic_array.o libipvs/libipvs.a -L/usr/lib -lpopt
/usr/lib/libpopt.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
I have the problematic library exists and seems fine
Code:
$ file /usr/lib/libpopt.*
/usr/lib/libpopt.a:        current ar archive
/usr/lib/libpopt.so:       symbolic link to `libpopt.so.0.0.0'
/usr/lib/libpopt.so.0:     symbolic link to `libpopt.so.0.0.0'
/usr/lib/libpopt.so.0.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0x096d17e510cee6b9ec0e28f64b2ce67cc910cd27, stripped
$ whereis arm_v5t_le-gcc
arm_v5t_le-gcc: /opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin/arm_v5t_le-gcc
Any idea how to fix it ?

Thank you

Last edited by martvefun; 06-16-2012 at 10:31 AM.
 
Old 06-16-2012, 10:48 AM   #2
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,159

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
so you want to build a tool for your arm device on an x86_64 machine. In this case the option -L/usr/lib is definitely not usable, because the libs located in /usr/lib belong to the OS and cannot be used on arm. You need to find the appropriate libpopt. Probably locate will tell you were is it (maybe somewhere here /opt/mv_pro_5.0/montavista/pro/devkit/arm)
 
2 members found this post helpful.
Old 06-16-2012, 10:58 AM   #3
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,279

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
... And if there's no libpopt.so in /opt/mv_pro_5.0/montavista/pro/devkit/arm :

Then you will have to cross compile "popt" ( and all other dependencies )
to e.g. /opt/mv_pro_5.0/montavista/pro/devkit/arm.
 
Old 06-16-2012, 11:34 AM   #4
martvefun
Member
 
Registered: Apr 2010
Location: Belgium
Distribution: Archlinux
Posts: 53

Original Poster
Rep: Reputation: 1
You are right. In the makefile there was this block

Code:
ifeq (,$(FORCE_GETOPT))
LIB_SEARCH = /lib /usr/lib /usr/local/lib
POPT_LIB = $(shell for i in $(LIB_SEARCH); do \
  if [ -f $$i/libpopt.a ]; then \
    if nm $$i/libpopt.a | fgrep -q poptGetContext; then \
	echo "-L$$i -lpopt"; \
    fi; \
  fi; \
done)
endif
I replaced the first line by

Code:
MVPATH = /opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/target
LIB_SEARCH = $(MVPATH)/lib $(MVPATH)/usr/lib $(MVPATH)/usr/local/lib
and it works, thanks

Last edited by martvefun; 06-16-2012 at 11:48 AM.
 
  


Reply

Tags
arm, ipvs, make


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Makefile: file not recognized:File format not recognized collect2: ld returned 1 exit Bringo Linux - Software 9 12-20-2010 05:08 AM
OpenSuse: build is installed but not recognized by make. StefanB46 Linux - Newbie 6 07-06-2010 05:12 AM
Compiler error : /usr/lib/libc.so: file not recognized: File format not recognized kreena Solaris / OpenSolaris 7 12-14-2009 03:51 AM
ide for g++ programming and how to build make file? matiasar Programming 7 09-15-2008 10:57 AM
libpopt.so.0: cannot read file data agustingp7 Linux - Desktop 2 11-22-2006 08:27 AM


All times are GMT -5. The time now is 07:20 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