Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am using the LFS Book 12.1 and have reached section 5.6 with no problems until `libstdc++-v3`. I ran all commands as said in book until the `make` command for `libstdc++-v3`. It gave me this error:
Code:
In file included from /mnt/LFS/sources/gcc-13.2.0/build/include/bits/move.h:37,
from /mnt/LFS/sources/gcc-13.2.0/build/include/bits/exception_ptr.h:41,
from /mnt/LFS/sources/gcc-13.2.0/libstdc++-v3/libsupc++/exception:164,
from ../../libstdc++-v3/libsupc++/unwind-cxx.h:34,
from ../../libstdc++-v3/libsupc++/eh_arm.cc:26:
/mnt/LFS/sources/gcc-13.2.0/build/include/type_traits:3363:66: error: expected primary-expression before ',' token
3363 | inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
| ^
In file included from /mnt/LFS/sources/gcc-13.2.0/build/include/bits/move.h:37,
from /mnt/LFS/sources/gcc-13.2.0/build/include/bits/exception_ptr.h:41,
from ../../libstdc++-v3/libsupc++/exception:164,
from ../../libstdc++-v3/libsupc++/eh_aux_runtime.cc:26:
/mnt/LFS/sources/gcc-13.2.0/build/include/type_traits:3363:66: error: expected primary-expression before ',' token
3363 | inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
| ^
In file included from /mnt/LFS/sources/gcc-13.2.0/build/include/bits/move.h:37,
from /mnt/LFS/sources/gcc-13.2.0/build/include/bits/exception_ptr.h:41,
from /mnt/LFS/sources/gcc-13.2.0/libstdc++-v3/libsupc++/exception:164,
from ../../libstdc++-v3/libsupc++/unwind-cxx.h:34,
from ../../libstdc++-v3/libsupc++/eh_call.cc:28:
/mnt/LFS/sources/gcc-13.2.0/build/include/type_traits:3363:66: error: expected primary-expression before ',' token
3363 | inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
| ^
/mnt/LFS/sources/gcc-13.2.0/build/include/type_traits:3363:71: error: expected primary-expression before ')' token
3363 | inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
| ^
/mnt/LFS/sources/gcc-13.2.0/build/include/type_traits:3363:71: error: expected primary-expression before ')' token
3363 | inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
| ^
/mnt/LFS/sources/gcc-13.2.0/build/include/type_traits:3363:44: error: there are no arguments to '__is_convertible' that depend on a template parameter, so a declaration of '__is_convertible' must be available [-fpermissive]
3363 | inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
| ^~~~~~~~~~~~~~~~
/mnt/LFS/sources/gcc-13.2.0/build/include/type_traits:3363:71: error: expected primary-expression before ')' token
3363 | inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
| ^
/mnt/LFS/sources/gcc-13.2.0/build/include/type_traits:3363:44: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/mnt/LFS/sources/gcc-13.2.0/build/include/type_traits:3363:44: error: there are no arguments to '__is_convertible' that depend on a template parameter, so a declaration of '__is_convertible' must be available [-fpermissive]
3363 | inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
| ^~~~~~~~~~~~~~~~
/mnt/LFS/sources/gcc-13.2.0/build/include/type_traits:3363:44: error: there are no arguments to '__is_convertible' that depend on a template parameter, so a declaration of '__is_convertible' must be available [-fpermissive]
3363 | inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
| ^~~~~~~~~~~~~~~~
/mnt/LFS/sources/gcc-13.2.0/build/include/type_traits:3363:44: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/mnt/LFS/sources/gcc-13.2.0/build/include/type_traits:3363:44: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
make[2]: *** [Makefile:777: eh_arm.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /mnt/LFS/sources/gcc-13.2.0/build/include/bits/move.h:37,
from /mnt/LFS/sources/gcc-13.2.0/build/include/bits/exception_ptr.h:41,
from /mnt/LFS/sources/gcc-13.2.0/libstdc++-v3/libsupc++/exception:164,
from ../../libstdc++-v3/libsupc++/eh_alloc.cc:33:
/mnt/LFS/sources/gcc-13.2.0/build/include/type_traits:3363:66: error: expected primary-expression before ',' token
3363 | inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
| ^
/mnt/LFS/sources/gcc-13.2.0/build/include/type_traits:3363:71: error: expected primary-expression before ')' token
3363 | inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
| ^
/mnt/LFS/sources/gcc-13.2.0/build/include/type_traits:3363:44: error: there are no arguments to '__is_convertible' that depend on a template parameter, so a declaration of '__is_convertible' must be available [-fpermissive]
3363 | inline constexpr bool is_convertible_v = __is_convertible(_From, _To);
| ^~~~~~~~~~~~~~~~
/mnt/LFS/sources/gcc-13.2.0/build/include/type_traits:3363:44: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
make[2]: *** [Makefile:777: eh_call.lo] Error 1
make[2]: *** [Makefile:777: eh_aux_runtime.lo] Error 1
make[2]: *** [Makefile:777: eh_alloc.lo] Error 1
make[2]: Leaving directory '/mnt/LFS/sources/gcc-13.2.0/build/libsupc++'
make[1]: *** [Makefile:576: all-recursive] Error 1
make[1]: Leaving directory '/mnt/LFS/sources/gcc-13.2.0/build'
make: *** [Makefile:501: all] Error 2
The full log for the make command before the error is:
murugesandinsdins@127.0.0.1 /home/murugesandinsdins/gcc-master/gcc-13.2.0/libstdc++-v3 [ 0 ]
$ ./configure
# ....
config.status: creating include/Makefile
./config.status: line 2625: ./../../config-ml.in: No such file or directory
murugesandins@127.0.0.1 /home/murugesandins/gcc-master/gcc-13.2.0/libstdc++-v3 [ 1 ]
$ cp configure configure.Original
murugesandins@127.0.0.1 /home/murugesandins/gcc-master/gcc-13.2.0/libstdc++-v3 [ 1 ]
$ grep -n =.*config-ml.in configure
74765: ac_file=Makefile . ${multi_basedir}/config-ml.in
$ vi +74765 configure
Inside configure file
Code:
Replace:
if test "$srcdir" = "."; then
if test "$with_target_subdir" != "."; then
multi_basedir="$srcdir/$with_multisrctop../.."
else
multi_basedir="$srcdir/$with_multisrctop.."
fi
else
multi_basedir="$srcdir/.."
fi
With:
if test "$srcdir" = "."; then
if test "$with_target_subdir" != "."; then
#murugesandins_IDA20Apr20240710AMIST
#multi_basedir="$srcdir/$with_multisrctop../.."
multi_basedir="$srcdir/$with_multisrctop../"
#murugesandins_IDA20Apr20240710AMIST
else
multi_basedir="$srcdir/$with_multisrctop.."
fi
else
multi_basedir="$srcdir/.."
fi
$ cd gcc-13.2.0/libstdc++-v3/include
$ make
echo timestamp > stamp-host
mkdir -p .//bits/stdc++.h.gch
/usr/bin/g++ -std=c++11
...
Completed all
$ make
Completed all
Code:
$ cd ../../..
$ cp gcc-13.2.0/libstdc++-v3/Makefile gcc-13.2.0/libstdc++-v3/Makefile.Original
$ vi gcc-13.2.0/libstdc++-v3/Makefile
Replace:
CXX = g++
CXXCPP = g++ -E
...
ac_ct_CXX = g++
ac_ct_CC = gcc
With:
CXX=/usr/bin/g++ -std=c++11
CXXCPP=/usr/bin/g++ -E
...
ac_ct_CC=/usr/bin/gcc
ac_ct_CXX=/usr/bin/g++ -std=c++11
...
Remove all => -rm -f Makefile
$ # save and quit
$ cd gcc-13.2.0/libstdc++-v3/
Perform similar changes (including rm -f Makefile) at following file.
gcc-13.2.0/libstdc++-v3/libsupc++/Makefile
Last edited by murugesandins; 05-10-2024 at 07:34 AM.
Reason: updating each make updates at comments.
I am not trying more changes at localhost.
You need to use std=c++17
Reason:
error: ‘string_view’ in namespace ‘std’ does not name a type
Hence like me(std=c++11) you need to download g++/g++.exe at related operating system and re-compile using related Makefile changes and make/gmake.exe/make.exe based on your OS.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.