LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 10-28-2016, 09:10 PM   #1
cellsheet
LQ Newbie
 
Registered: Aug 2014
Posts: 16

Rep: Reputation: Disabled
Question cannot find -lpopt


Hello, I'm attempting to compilie efivars in my chroot for uefi, and even though I compiled and installed libpopt with
Code:
sed -i -e "s/@MARK64@//" Makefile.am
from http://wiki.linuxfromscratch.org/blfs/wiki/popt (and attempted to install without that sed) I get the following:

Code:
root:/sources/efivar-28# make libdir="/usr/lib/" bindir="/usr/bin/" mandir="/usr/share/man/" includedir="/usr/include/" V=1 -j1
make[1]: Entering directory '/sources/efivar-28/src'
make -f /sources/efivar-28/src/Make.deps deps SOURCES="crc32.c creator.c disk.c gpt.c linux.c loadopt.c dp.c dp-acpi.c dp-hw.c dp-media.c dp-message.c efivarfs.c error.c export.c guid.c guids.S guid-symbols.c lib.c vars.c makeguids.c guid.c include/efivar/efivar-guids.h include/efivar/efivar.h include/efivar/efiboot.h include/efivar/efiboot-loadopt.h include/efivar/efivar-dp.h include/efivar/efiboot-creator.h include/efivar/efivar-guids.h guid-symbols.c efivar.c"
make[2]: Entering directory '/sources/efivar-28/src'
make[2]: Nothing to be done for 'deps'.
make[2]: Leaving directory '/sources/efivar-28/src'
gcc -O2 -g3 -I/sources/efivar-28/src/include/efivar/  -specs=/sources/efivar-28/gcc.specs  -L.      -static  -o efivar-static efivar.c dp.static.o dp-acpi.static.o dp-hw.static.o dp-media.static.o dp-message.static.o efivarfs.static.o error.static.o export.static.o guid.static.o guids.static.o guid-symbols.static.o lib.static.o vars.static.o -ldl -lpopt
/usr/bin/ld: cannot find -lpopt
collect2: error: ld returned 1 exit status
make[1]: *** [/sources/efivar-28/Make.rules:17: efivar-static] Error 1
make[1]: Leaving directory '/sources/efivar-28/src'
make: *** [Makefile:11: all] Error 2
Here is ld output:

Code:
OUTPUT_ARCH(i386:x86-64)
ENTRY(_start)
SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");

<ld linker script here>
==================================================
attempt to open /usr/x86_64-pc-linux-gnu/lib64/libpopt.so failed
attempt to open /usr/x86_64-pc-linux-gnu/lib64/libpopt.a failed
attempt to open /usr/local/lib64/libpopt.so failed
attempt to open /usr/local/lib64/libpopt.a failed
attempt to open /lib64/libpopt.so failed
attempt to open /lib64/libpopt.a failed
attempt to open /usr/lib64/libpopt.so succeeded
-lpopt (/usr/lib64/libpopt.so)
libc.so.6 needed by /usr/lib64/libpopt.so
found libc.so.6 at /lib64/libc.so.6
ld-linux-x86-64.so.2 needed by /lib64/libc.so.6
found ld-linux-x86-64.so.2 at /lib64/ld-linux-x86-64.so.2
ld: warning: cannot find entry symbol _start; not setting start address
EDIT: The issue is that LFS disabled static library's which are needed. Solved.

Last edited by cellsheet; 10-29-2016 at 09:02 AM.
 
Old 11-02-2016, 07:37 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Thanks for marking this Solved.

Can you put more detail in (i.e. exactly what you did to enable static libraries if that is what you did) so others in future will find your solution?
 
Old 11-02-2016, 07:40 AM   #3
cellsheet
LQ Newbie
 
Registered: Aug 2014
Posts: 16

Original Poster
Rep: Reputation: Disabled
Yes - In order to enable, in popt, configure like so

Code:
 ./configure --prefix=/usr
 
1 members found this post helpful.
  


Reply

Tags
lfs error



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
Old School -- gdbmtool & dbmutil -- can't find RPMs and can't find Source spudzy Linux - Software 3 09-27-2014 06:29 AM
[SOLVED] Bash Issue with Find Script: find paths must precede expression: *.txt JockVSJock Programming 4 01-06-2014 09:03 PM
[SOLVED] Find URL in Debian package index via awk/sed (=find a line, then search from there) maddes.b Linux - Software 11 06-28-2013 07:37 AM
[GNU find version 4.2.27] find: paths must precede expression mechagojira Linux - Newbie 3 07-06-2011 05:34 AM
Find/grep/wc command to find matching files, print filename and word count dbasch Linux - Newbie 10 09-14-2009 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:08 AM.

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
Open Source Consulting | Domain Registration