LinuxQuestions.org
Help answer threads with 0 replies.
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 06-29-2020, 01:15 PM   #1
bear_2
LQ Newbie
 
Registered: Jun 2020
Posts: 3

Rep: Reputation: Disabled
First pass toolchain cannot run c compiled programs v9.1


Stuck on ch5.9 configuring Binutils pass 2. The configuration error I get from config.log is :

Code:
configure:4360: $? = 1
configure:4380: checking whether the C compiler works
configure:4402: x86_64-lfs-linux-gnu-gcc    conftest.c  >&5
configure:4406: $? = 0
configure:4454: result: yes
configure:4457: checking for C compiler default output file name
configure:4459: result: a.out
configure:4465: checking for suffix of executables
configure:4472: x86_64-lfs-linux-gnu-gcc -o conftest    conftest.c  >&5
configure:4476: $? = 0
configure:4498: result: 
configure:4520: checking whether we are cross compiling
configure:4528: x86_64-lfs-linux-gnu-gcc -o conftest    conftest.c  >&5
configure:4532: $? = 0
configure:4539: ./conftest
./conftest: error while loading shared libraries: libv4l1.so.0: cannot open shared object file: No such file or directory
configure:4543: $? = 127
configure:4550: error: in `/mnt/lfs/sources/binutils-2.34/build':
configure:4552: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
CC is x86_64-lfs-linux-gnu-gcc
I tried running the empty int main(){} dummy file and it gives the same error with libv4l1.so.0

Building on Ubuntu 20.04

Last edited by bear_2; 06-29-2020 at 01:16 PM.
 
Old 06-29-2020, 02:03 PM   #2
arch-linq
Member
 
Registered: Sep 2018
Location: Midwest, USA
Distribution: Arch,LFS,BLFS
Posts: 74

Rep: Reputation: Disabled
Same answer prep your host properly.

https://www.linuxquestions.org/quest...-h-4175677782/
 
Old 06-30-2020, 11:38 AM   #3
bear_2
LQ Newbie
 
Registered: Jun 2020
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by arch-linq View Post
Same answer prep your host properly.
Everything on the list is installed as far as I can tell and I haven't used newer versions where it says they aren't tested. Output of version-check:

Code:
bash, version 5.0.16(1)-release
/bin/sh -> /usr/bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.34
bison (GNU Bison) 3.5.1
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.8, 13-Jul-2019.
Coreutils:  8.30
diff (GNU diffutils) 3.7
find (GNU findutils) 4.7.0
GNU Awk 5.0.1, API: 2.0 (GNU MPFR 4.0.2, GNU MP 6.2.0)
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0
(Ubuntu GLIBC 2.31-0ubuntu9) 2.31
grep (GNU grep) 3.4
gzip 1.10
Linux version 5.4.0-39-generic (buildd@lcy01-amd64-016) (gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)) #43-Ubuntu SMP Fri Jun 19 10:28:31 UTC 2020
m4 (GNU M4) 1.4.18
GNU Make 4.2.1
GNU patch 2.7.6
Perl version='5.30.0';
Python 3.8.2
sed (GNU sed) 4.7
tar (GNU tar) 1.30
texi2any (GNU texinfo) 6.7
xz (XZ Utils) 5.2.4
g++ compilation OK
And glibc is version 2.31.
 
Old 06-30-2020, 12:29 PM   #4
arch-linq
Member
 
Registered: Sep 2018
Location: Midwest, USA
Distribution: Arch,LFS,BLFS
Posts: 74

Rep: Reputation: Disabled
Backtrack in your host bash to find the offending step error or start over. Hard to tell by the error what step caused it.
 
Old 07-01-2020, 07:40 AM   #5
bryan_S
Member
 
Registered: Aug 2014
Location: N. Florida
Distribution: LFS, Arch, Crux
Posts: 41

Rep: Reputation: Disabled
You could try installing v4l-utils - that's should provide the missing library. I don't know what that has to do with gcc but it must link to that library. I've found the best host to build LFS on is LFS - but you've to get there first ...
 
Old 07-01-2020, 02:18 PM   #6
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 2,825

Rep: Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719Reputation: 719
with errors so early in the tool chain its best just to start from scratch
 
Old 07-02-2020, 02:55 PM   #7
Steo
LQ Newbie
 
Registered: Jul 2020
Posts: 6

Rep: Reputation: Disabled
Assuming you haven't missed 4.4 Setting up the environment, "echo $PATH" should return "PATH=/tools/bin:/bin:/usr/bin". On the off chance that it isn't, and you have /mnt/lfs/tools symlinked as /tools, try "export PATH=/tools/bin:/bin:/usr/bin", then try compiling binutils again. It might be best to start over though as mentioned above, assuming the PATH is already correct.
 
Old 07-08-2020, 10:02 PM   #8
bear_2
LQ Newbie
 
Registered: Jun 2020
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bryan_S View Post
You could try installing v4l-utils - that's should provide the missing library.
That's what I thought, but it still gives the error with it installed

Quote:
Originally Posted by Keith Hedger View Post
with errors so early in the tool chain its best just to start from scratch
I've restarted from scratch multiple times, always the same thing.

Quote:
Originally Posted by Steo View Post
Assuming you haven't missed 4.4 Setting up the environment, "echo $PATH" should return "PATH=/tools/bin:/bin:/usr/bin". On the off chance that it isn't, and you have /mnt/lfs/tools symlinked as /tools, try "export PATH=/tools/bin:/bin:/usr/bin", then try compiling binutils again. It might be best to start over though as mentioned above, assuming the PATH is already correct.
PATH="/tools/bin:/bin:/usr/bin"
 
  


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
[SOLVED] error: cannot run compiled C programs, ch.5.9 configure 2nd pass of binutils. Stumped! spenced Linux From Scratch 1 05-18-2018 10:08 PM
Ch 5.9 Binutils Pass 2 Error: Cannot run C compiled programs strungmind Linux From Scratch 38 02-08-2013 06:08 PM
Problem on LFS 7.0 with 5.10 - GCC pass 2 - Cannot run C compiled programs czarherr Linux From Scratch 5 12-07-2011 09:43 PM
LFS 6.5 -- Binutils-2.19.1 - Pass 2 gives error: cannot run C compiled programs kamleshk1 Linux From Scratch 7 11-16-2010 08:57 AM
cannot run C compiled programs Astro Slackware 7 01-27-2004 10:32 PM

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

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