LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-13-2017, 04:54 AM   #1
riscv
Member
 
Registered: Mar 2017
Posts: 34

Rep: Reputation: Disabled
Installation (Linux) RISCV GNU Toolchain error: C compiler cannot create executables, recipe for target 'configure-target-libgomp' failed


Hello,

I am trying to install the RISCV GNU Compiler Toolchain. I'm currently stuck on in the Installation (Linux) phase below the Installation (Newlib) phase. I've followed the instructions as is and have got the following error:

---------------------------------------------------------------

checking whether the /home/lagha/project/riscv-gnu-toolchain/build-gcc-linux-stage2/./gcc/gfortran -B/home/lagha/project/riscv-gnu-toolchain/build-gcc-linux-stage2/./gcc/ -B/opt/riscv/riscv64-unknown-linux-gnu/bin/ -B/opt/riscv/riscv64-unknown-linux-gnu/lib/ -isystem /opt/riscv/riscv64-unknown-linux-gnu/include -isystem /opt/riscv/riscv64-unknown-linux-gnu/sys-include linker (/home/lagha/project/riscv-gnu-toolchain/build-gcc-linux-stage2/./gcc/collect-ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking whether string.h and strings.h may both be included... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for unistd.h... (cached) yes
checking semaphore.h usability... yes
checking semaphore.h presence... yes
checking for semaphore.h... yes
checking sys/loadavg.h usability... no
checking sys/loadavg.h presence... no
checking for sys/loadavg.h... no
checking sys/sysctl.h usability... yes
checking sys/sysctl.h presence... yes
checking for sys/sysctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
looking for a compliant stdint.h in stdint.h, checking for uintmax_t... yes
checking for uintptr_t... yes
checking for int_least32_t... yes
checking for int_fast32_t... yes
checking for uint64_t... yes
checking what to include in gstdint.h... stdint.h (already complete)
checking for dlsym in -ldl... yes
checking for unistd.h... (cached) yes
checking for secure_getenv... yes
checking for __secure_getenv... no
checking for getuid... yes
checking for geteuid... yes
checking for getgid... yes
checking for getegid... yes
checking for getloadavg... yes
checking for clock_gettime... yes
checking for strtoull... yes
checking whether the target supports thread-local storage... yes
checking whether the thread-local storage support is from emutls... no
checking whether the target supports hidden visibility... yes
checking whether the target supports dllexport... no
checking whether the target supports symbol aliases... yes
checking for ld used by /home/lagha/project/riscv-gnu-toolchain/build-gcc-linux-stage2/./gcc/xgcc -B/home/lagha/project/riscv-gnu-toolchain/build-gcc-linux-stage2/./gcc/ -B/opt/riscv/riscv64-unknown-linux-gnu/bin/ -B/opt/riscv/riscv64-unknown-linux-gnu/lib/ -isystem /opt/riscv/riscv64-unknown-linux-gnu/include -isystem /opt/riscv/riscv64-unknown-linux-gnu/sys-include ... (cached) /home/lagha/project/riscv-gnu-toolchain/build-gcc-linux-stage2/./gcc/collect-ld
checking if the linker (/home/lagha/project/riscv-gnu-toolchain/build-gcc-linux-stage2/./gcc/collect-ld) is GNU ld... (cached) yes
checking for shared libgcc... yes
checking whether the target supports .symver directive... yes
configure: versioning on shared library symbols is gnu
checking whether the target supports __sync_*_compare_and_swap... yes
configure: updating cache ./config.cache
configure: creating ./config.status
config.status: creating omp.h
config.status: creating omp_lib.h
config.status: creating omp_lib.f90
config.status: creating libgomp_f.h
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating libgomp.spec
config.status: creating testsuite/libgomp-test-support.pt.exp
config.status: creating config.h
config.status: executing default-1 commands
Adding multilib support to Makefile in /home/lagha/project/riscv-gnu-toolchain/riscv-gcc/libgomp
multidirs=lib32/ilp32 lib32/ilp32d lib64/lp64 lib64/lp64d
with_multisubdir=
Running configure in multilib subdirs lib32/ilp32 lib32/ilp32d lib64/lp64 lib64/lp64d
pwd: /home/lagha/project/riscv-gnu-toolchain/build-gcc-linux-stage2/riscv64-unknown-linux-gnu/libgomp
Running configure in multilib subdir lib32/ilp32
pwd: /home/lagha/project/riscv-gnu-toolchain/build-gcc-linux-stage2/riscv64-unknown-linux-gnu
configure: creating cache ./config.cache
checking for --enable-version-specific-runtime-libs... no
checking for --enable-generated-files-in-srcdir... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... riscv64-unknown-linux-gnu
checking target system type... riscv64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for riscv64-unknown-linux-gnu-strip... /opt/riscv/riscv64-unknown-linux-gnu/bin/strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... /usr/bin/gawk
checking whether make sets $(MAKE)... yes
checking for riscv64-unknown-linux-gnu-gcc... /home/lagha/project/riscv-gnu-toolchain/build-gcc-linux-stage2/./gcc/xgcc -B/home/lagha/project/riscv-gnu-toolchain/build-gcc-linux-stage2/./gcc/ -B/opt/riscv/riscv64-unknown-linux-gnu/bin/ -B/opt/riscv/riscv64-unknown-linux-gnu/lib/ -isystem /opt/riscv/riscv64-unknown-linux-gnu/include -isystem /opt/riscv/riscv64-unknown-linux-gnu/sys-include -march=rv32imac -mabi=ilp32
checking for C compiler default output file name...
configure: error: in `/home/lagha/project/riscv-gnu-toolchain/build-gcc-linux-stage2/riscv64-unknown-linux-gnu/lib32/ilp32/libgomp':
configure: error: C compiler cannot create executables
See `config.log' for more details.
Makefile:13571: recipe for target 'configure-target-libgomp' failed
make[2]: *** [configure-target-libgomp] Error 1
make[2]: Leaving directory '/home/lagha/project/riscv-gnu-toolchain/build-gcc-linux-stage2'
Makefile:893: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/lagha/project/riscv-gnu-toolchain/build-gcc-linux-stage2'
Makefile:172: recipe for target 'stamps/build-gcc-linux-stage2' failed
make: *** [stamps/build-gcc-linux-stage2] Error 2


----------------------------------------------------------------

Could you please help me find the source of this error and how to rectify it. I'm doubting the PATH is incorrect, and being a n00b, could you please tell me how I can set the correct path. Thank you.
 
Old 03-14-2017, 07:58 AM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Hey NSCV,
Welcome to linux questions.
Quote:
I'm doubting the PATH is incorrect
You could be right, but that error this is pretty generic
Quote:
configure: error: in `/home/lagha/project/riscv-gnu-toolchain/build-gcc-linux-stage2/riscv64-unknown-linux-gnu/lib32/ilp32/libgomp':
configure: error: C compiler cannot create executables

See `config.log' for more details.
Makefile:13571: recipe for target 'configure-target-libgomp' failed
Could you look in the config.log and post the last few lines
 
Old 03-23-2017, 08:36 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
@riscv : Please edit your {text / configuring / error} blocks to use code tags :
[code]text[/code]

About your issues : Just be sure that g++ is installed : $ sudo apt install g++
... Then the build.sh and the other build scripts will choose the right gcc/g++.

This will do : $ export RISCV=/home/alpha/riscv-tools && ./build.sh


-
 
  


Reply

Tags
riscv



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
Make producing error 'Makefile:1669: recipe for target 'modules' failed' on Kali 2.0 qwertyatom100 Linux - Newbie 1 11-14-2015 11:12 PM
Recipe for target opncls.lo failed aqua123 Linux From Scratch 1 07-22-2014 09:20 PM
[SOLVED] otcl-1.14 make failed [recipe for target `libotcl.a' failed] for ns-allinone-2.35-RC8 pratikjoshi Linux - Newbie 4 08-23-2013 06:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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