LinuxQuestions.org
Visit Jeremy's Blog.
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 08-04-2022, 02:59 PM   #1
earthexe
LQ Newbie
 
Registered: Aug 2022
Posts: 2

Rep: Reputation: 0
Chapter 8.11 in Linux from Scratch 11.1; There is an error with a make file.


So when I was building Linux from Scratch with an Ubuntu ISO, I was all right, until I came at Readline-8.1.2 on chapter 8.11. Also, there were no errors prior. Here were my steps for building Readline-8.1.2:

First, (as chroot) I unzipped the readline-8.1.2.tar.gz file with
Code:
tar -xf readline-8.1.2.tar.gz
. I then ran
Code:
cd readline-8.1.2
Then, I ran
Code:
sed -i '/MV.*old/d' Makefile.in
sed -i '/{OLDSUFF}/c:' support/shlib-install
, which produced no output.

Then I ran
Code:
./configure --prefix=/usr    \
            --disable-static \
            --with-curses    \
            --docdir=/usr/share/doc/readline-8.1.2
, which didn't throw any errors either.

This is where I started seeing the error. When I ran
Code:
make SHLIB_LIBS="-lncursesw"
, it threw an error. The main log is listed below. Is this something I should worry about, or should I not think about this?


Code:
cannot find -lncursesw: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:177: libreadline.so.8.1] Error 1
make[1]: Leaving directory '/sources/readline-8.1.2/shlib'
make: *** [Makefile:219: shared] Error 2
Full log:

Code:
test -d shlib || mkdir shlib
( cd shlib ; make  all )
make[1]: Entering directory '/sources/readline-8.1.2/shlib'
rm -f readline.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o readline.o ../readline.c 
mv readline.o readline.so
rm -f vi_mode.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o vi_mode.o ../vi_mode.c 
mv vi_mode.o vi_mode.so
rm -f funmap.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o funmap.o ../funmap.c 
mv funmap.o funmap.so
rm -f keymaps.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o keymaps.o ../keymaps.c 
mv keymaps.o keymaps.so
rm -f parens.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o parens.o ../parens.c 
mv parens.o parens.so
rm -f search.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o search.o ../search.c 
mv search.o search.so
rm -f rltty.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o rltty.o ../rltty.c 
mv rltty.o rltty.so
rm -f complete.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o complete.o ../complete.c 
mv complete.o complete.so
rm -f bind.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o bind.o ../bind.c 
mv bind.o bind.so
rm -f isearch.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o isearch.o ../isearch.c 
mv isearch.o isearch.so
rm -f display.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o display.o ../display.c 
mv display.o display.so
rm -f signals.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o signals.o ../signals.c 
mv signals.o signals.so
rm -f util.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o util.o ../util.c 
mv util.o util.so
rm -f kill.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o kill.o ../kill.c 
mv kill.o kill.so
rm -f undo.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o undo.o ../undo.c 
mv undo.o undo.so
rm -f macro.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o macro.o ../macro.c 
mv macro.o macro.so
rm -f input.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o input.o ../input.c 
mv input.o input.so
rm -f callback.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o callback.o ../callback.c 
mv callback.o callback.so
rm -f terminal.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o terminal.o ../terminal.c 
mv terminal.o terminal.so
rm -f text.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o text.o ../text.c 
mv text.o text.so
rm -f nls.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o nls.o ../nls.c 
mv nls.o nls.so
rm -f misc.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o misc.o ../misc.c 
mv misc.o misc.so
rm -f history.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o history.o ../history.c 
mv history.o history.so
rm -f histexpand.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o histexpand.o ../histexpand.c 
mv histexpand.o histexpand.so
rm -f histfile.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o histfile.o ../histfile.c 
mv histfile.o histfile.so
rm -f histsearch.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o histsearch.o ../histsearch.c 
mv histsearch.o histsearch.so
rm -f shell.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o shell.o ../shell.c 
mv shell.o shell.so
rm -f mbutil.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o mbutil.o ../mbutil.c 
mv mbutil.o mbutil.so
rm -f tilde.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -DREADLINE_LIBRARY -c -o tilde.o ../tilde.c
mv tilde.o tilde.so
rm -f colors.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o colors.o ../colors.c 
mv colors.o colors.so
rm -f parse-colors.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o parse-colors.o ../parse-colors.c 
mv parse-colors.o parse-colors.so
rm -f xmalloc.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o xmalloc.o ../xmalloc.c 
mv xmalloc.o xmalloc.so
rm -f xfree.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o xfree.o ../xfree.c 
mv xfree.o xfree.so
rm -f compat.so
gcc -c -DHAVE_CONFIG_H   -I. -I.. -I..  -DRL_LIBRARY_VERSION='"8.1"' -DBRACKETED_PASTE_DEFAULT=1 -g -O2 -Wno-parentheses -Wno-format-security -fPIC -o compat.o ../compat.c 
mv compat.o compat.so
rm -f libreadline.so.8.1
gcc -shared -Wl,-soname,libreadline.so.8.1 -Wl,-rpath,/usr/lib -Wl,-soname,`basename libreadline.so.8.1 .1` -o libreadline.so.8.1 readline.so vi_mode.so funmap.so keymaps.so parens.so search.so rltty.so complete.so bind.so isearch.so display.so signals.so util.so kill.so undo.so macro.so input.so callback.so terminal.so text.so nls.so misc.so history.so histexpand.so histfile.so histsearch.so shell.so mbutil.so tilde.so colors.so parse-colors.so xmalloc.so xfree.so compat.so -lncursesw
/usr/lib/gcc/x86_64-lfs-linux-gnu/11.2.0/../../../../x86_64-lfs-linux-gnu/bin/ld: cannot find -lncursesw: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:177: libreadline.so.8.1] Error 1
make[1]: Leaving directory '/sources/readline-8.1.2/shlib'
make: *** [Makefile:219: shared] Error 2
Thanks in advance!
 
Old 08-11-2022, 04:49 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,146

Rep: Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308Reputation: 2308
Hi, earthexe & welcmoe to LQ.
Code:
#define EPERM            1      /* Operation not permitted */
Just a quick one: Error 1 is a "Not permitted" type error. Were you root?

That is pulled from /usr/include/asm-generic/errno-base.h - just where you's expect to find it
 
1 members found this post helpful.
Old 08-11-2022, 05:38 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,499
Blog Entries: 19

Rep: Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410
When you have built and installed the ncurses library, you need to make a lot of symbolic links by hand because this library has a lot of traditional names. My guess is that you have not included a link in the name that this build script is looking for.

Read the end section of the ncurses page again and check that you have done all the linking required.

Last edited by hazel; 08-11-2022 at 05:40 AM.
 
Old 08-19-2022, 01:47 PM   #4
earthexe
LQ Newbie
 
Registered: Aug 2022
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks! This worked!
 
Old 11-23-2022, 01:59 AM   #5
xlfs-0.2
Member
 
Registered: Oct 2022
Posts: 207

Rep: Reputation: 44
> "you need to make a lot of symbolic links by hand"

That doesn't sound right. are you saying LFS is only a hint and doesn't show the correct recipe?
 
Old 11-23-2022, 04:32 AM   #6
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,499
Blog Entries: 19

Rep: Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410Reputation: 4410
Quote:
Originally Posted by xlfs-0.2 View Post
> "you need to make a lot of symbolic links by hand"

That doesn't sound right. are you saying LFS is only a hint and doesn't show the correct recipe?
No, it shows everything. Read the chapter on ncurses again and you will see that there is a final section telling you how to make all the necessary links. You have to make them by hand; they're not created automatically by the makefile. But you do get full instructions on how to do it.

The problem is that people tend not to notice that last paragraph because it's so unusual. I don't think there's any other package where you have to do that.
 
  


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
ali aladdin v agp stinks :scratch: :scratch: :scratch: Mr Marmmalade Linux - Hardware 1 07-08-2003 05:11 AM

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

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