LinuxQuestions.org
Help answer threads with 0 replies.
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 02-22-2024, 04:12 AM   #1
josiauh
LQ Newbie
 
Registered: Feb 2024
Posts: 2

Rep: Reputation: 0
Unhappy ./configure file not creating getopt-cdefs.h from it's .in.h file (grep-3.11)


The section I'm following is 8.34 of the LFS book (stable view).
I ran the following command in /sources/grep-3.11 with chroot:
Code:
./configure --prefix=/usr
I run "make" after that and I get this:
Code:
../lib/getopt.h:84:10: fatal error: getopt-cdefs.h: No such file or directory
   84 | #include <getopt-cdefs.h>
      |          ^~~~~~~~~~~~~~~~
getopt-cdefs.in.h exists, but not getopt-cdefs.h. Grep output from ls (focus on the first line, and try looking for the actual getopt-cdefs.h file):
Code:
(lfs chroot) root:/sources/grep-3.11# ls lib | grep getopt 
getopt-cdefs.in.h
getopt-core.h
getopt-ext.h
getopt-pfx-core.h
getopt-pfx-ext.h
getopt.c
getopt.h
getopt.in.h
getopt1.c
getopt_int.h
libgreputils_a-getopt.o
libgreputils_a-getopt1.o
 
Old 02-23-2024, 12:28 AM   #2
josiauh
LQ Newbie
 
Registered: Feb 2024
Posts: 2

Original Poster
Rep: Reputation: 0
I found it out! I had to force the lib/Makefile to make the file by modifying lines 6120-6126.
 
Old 05-29-2024, 02:23 AM   #3
Gurkensalat
LQ Newbie
 
Registered: May 2024
Posts: 1

Rep: Reputation: 0
Hello,

I Have the Same error in 8.34. how did you modify the lines?

6120: #getopt.h: $(top_builddir)/config.status
6121: # rm -f $@
6122: #
6123: #getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status
6124: # $(AM_V_GEN)$(SED_HEADER_STDOUT) \
6125: # -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
6126: # $(srcdir)/getopt-cdefs.in.h > $@-t
6127: # $(AM_V_at)mv $@-t $@


do i just have to uncommend these lines?
cause this dosnt work for me.

Last edited by Gurkensalat; 05-29-2024 at 02:28 AM.
 
Old 05-29-2024, 04:50 PM   #4
bryan_S
Member
 
Registered: Aug 2014
Location: N. Florida
Distribution: Linux-from-Scratch
Posts: 113

Rep: Reputation: Disabled
You shouldn't have to make any kind of non-documented (in the book or errata) modifications to the source to get it to build. Especially if you're using the stable version of the book. I think it's likely you haven't followed the book exactly or you've made a mistake earlier that will come back later to bite you.
 
  


Reply



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
How to grep on grep with regex? How to match only numbers and dots from a grep? debianfella Linux - Software 13 02-06-2024 01:59 PM
[SOLVED] aarch64-linux-gnu/sys/cdefs.h:24:11: fatal error: features.h: No such file or directory oti Debian 14 10-30-2023 12:25 AM
Creating an alias in ksh that uses grep and includes 'grep -v grep' doug248 Linux - Newbie 2 08-05-2012 02:07 PM
Can not install screensavers in Fedora 7 "getopt is missing but required" MheAd Linux - Desktop 2 06-08-2007 08:57 AM
autoslack Getopt/Mixed.pm not found chakkerz Slackware 2 03-21-2005 05:29 PM

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

All times are GMT -5. The time now is 03:22 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
Open Source Consulting | Domain Registration