LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-27-2017, 05:04 AM   #16
riscv
Member
 
Registered: Mar 2017
Posts: 34

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by Shadow_7 View Post
The libs that end in .a are for static linking. Perhaps there's an --enable-shared option that gets past it's absence, by using the .so. Or recompile the lib with --disable-shared or --enable-static, whatever applies to create the .a variant.
The command i run when i get the error is : CC=gcc-5 CXX=g++-5 ./build.sh

Do you mean i should run ./build.sh --enable-static or ./build.sh --disable-shared ?

Thank you
 
Old 03-27-2017, 05:37 AM   #17
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 16,809

Rep: Reputation: 3354Reputation: 3354Reputation: 3354Reputation: 3354Reputation: 3354Reputation: 3354Reputation: 3354Reputation: 3354Reputation: 3354Reputation: 3354Reputation: 3354
Re #16

Your default compiler is gcc-5, g++-5 : No reason to specify gcc, g++.


I'd suggest this for a starters, worked OK for me, any Linux OS :

$ export RISCV=/home/name/riscv-tools
$ export PATH=$PATH:$RISCV/bin
$ ./build.sh


-
 
Old 03-27-2017, 05:56 AM   #18
riscv
Member
 
Registered: Mar 2017
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Re #16

Your default compiler is gcc-5, g++-5 : No reason to specify gcc, g++.


I'd suggest this for a starters, worked OK for me, any Linux OS :

$ export RISCV=/home/name/riscv-tools
$ export PATH=$PATH:$RISCV/bin
$ ./build.sh


-
Done:

Code:
alpha@alpha-VirtualBox:~$ cd /home/alpha/installation/rocket-chip/riscv-tools
alpha@alpha-VirtualBox:~/installation/rocket-chip/riscv-tools$ export RISCV=/home/alpha/installation/rocket-chip/riscv-tools
alpha@alpha-VirtualBox:~/installation/rocket-chip/riscv-tools$ export PATH=$PATH:$RISCV/bin
alpha@alpha-VirtualBox:~/installation/rocket-chip/riscv-tools$ ./build.sh



Starting RISC-V Toolchain build process

Removing existing riscv-fesvr/build directory
Configuring project riscv-fesvr
Building project riscv-fesvr
Installing project riscv-fesvr

Removing existing riscv-isa-sim/build directory
Configuring project riscv-isa-sim
Building project riscv-isa-sim
Installing project riscv-isa-sim

Removing existing riscv-gnu-toolchain/build directory
Configuring project riscv-gnu-toolchain
Building project riscv-gnu-toolchain
ar: `u' modifier ignored since `D' is the default (see `U')
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/gas/config/tc-riscv.c: In function ‘riscv_pre_output_hook’:
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/gas/config/tc-riscv.c:2096:16: warning: passing argument 1 of ‘fix_new_exp’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   fix_new_exp (frag, (int) frag->fr_offset, 1, &exp, 0,
                ^
In file included from /home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/gas/as.h:548:0,
                 from /home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/gas/config/tc-riscv.c:23:
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/gas/write.h:183:14: note: expected ‘fragS * {aka struct frag *}’ but argument is of type ‘const fragS * {aka const struct frag *}’
 extern fixS *fix_new_exp
              ^
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/binutils/sysinfo.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
In file included from /home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/binutils/syslex_wrap.c:25:0:
syslex.c: In function ‘yy_get_next_buffer’:
syslex.c:1226:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFE
                                            ^
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/binutils/defparse.y: warning: 27 shift/reduce conflicts [-Wconflicts-sr]
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/binutils/rcparse.y: warning: 58 shift/reduce conflicts [-Wconflicts-sr]
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/binutils/rcparse.y: warning: 10 reduce/reduce conflicts [-Wconflicts-rr]
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/binutils/mcparse.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/binutils/doc/binutils.texi:813: warning: @ref node name should not contain `.'
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/binutils/doc/binutils.texi:1204: warning: @xref node name should not contain `.'
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/binutils/doc/binutils.texi:3722: warning: @ref node name should not contain `.'
arlex.c: In function ‘yy_get_next_buffer’:
arlex.c:1352:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFE
                                            ^
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/ld/deffilep.y: warning: 76 shift/reduce conflicts [-Wconflicts-sr]
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/ld/ld.texinfo:8190: warning: @pxref node name should not contain `.'
In file included from /home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/ld/ldlex-wrapper.c:26:0:
ldlex.c: In function ‘yy_get_next_buffer’:
ldlex.c:3497:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFE
                                            ^
configure: WARNING: decimal float is not supported for this target, ignored
ar: `u' modifier ignored since `D' is the default (see `U')
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/readline/complete.c: In function ‘fnwidth’:
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/readline/complete.c:701:12: warning: implicit declaration of function ‘wcwidth’ [-Wimplicit-function-declaration]
        w = wcwidth (wc);
            ^
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/readline/display.c: In function ‘rl_redisplay’:
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/readline/display.c:768:15: warning: implicit declaration of function ‘wcwidth’ [-Wimplicit-function-declaration]
        temp = wcwidth (wc);
               ^
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/readline/util.c: In function ‘_rl_tropen’:
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/readline/util.c:520:19: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘__pid_t {aka int}’ [-Wformat=]
   sprintf (fnbuf, "/var/tmp/rltrace.%ld", getpid());
                   ^
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/readline/histfile.c: In function ‘history_truncate_file’:
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/readline/histfile.c:410:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
       write (file, bp, chars_read - (bp - buffer));
       ^
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/readline/mbutil.c: In function ‘_rl_find_next_mbchar_internal’:
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/readline/mbutil.c:122:12: warning: implicit declaration of function ‘wcwidth’ [-Wimplicit-function-declaration]
        if (wcwidth (wc) == 0)
            ^
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/sim/riscv/configure: line 13590: SIM_AC_OPTION_HOSTENDIAN: command not found
configure: WARNING: no enhanced curses library found; disabling TUI
configure: WARNING: expat is missing or unusable; some features may be unavailable.
configure: WARNING: python is missing or unusable; some features may be unavailable.
configure: WARNING: libipt is missing or unusable; some features may be unavailable.
configure: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data.
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/sim/riscv/../common/sim-profile.c: In function ‘profile_pc_init’:
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/sim/riscv/../common/sim-profile.c:566:8: warning: left shift count >= width of type [-Wshift-count-overflow]
    ((1 << sizeof (sim_cia) * (8 - 1))
        ^
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/sim/riscv/../common/sim-profile.c:585:21: warning: left shift count >= width of type [-Wshift-count-overflow]
   bucket_size = ((1 << ((sizeof (sim_cia) * 8) - 1))
                     ^
Creating observer.htmp
Creating observer.itmp
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/gdb/c-exp.y: warning: 39 shift/reduce conflicts [-Wconflicts-sr]
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/gdb/c-exp.y: warning: 53 reduce/reduce conflicts [-Wconflicts-rr]
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/gdb/m2-exp.y: warning: 34 shift/reduce conflicts [-Wconflicts-sr]
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/gdb/m2-exp.y:301.25-44: warning: rule useless in parser due to conflicts [-Wother]
                         { start_arglist(); }
                         ^^^^^^^^^^^^^^^^^^^^
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/gdb/doc/gdb.texinfo:1989: warning: @xref node name should not contain `.'
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/gdb/doc/gdb.texinfo:8530: warning: @pxref node name should not contain `.'
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/gdb/doc/gdb.texinfo:18909: warning: @ref node name should not contain `.'
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/gdb/doc/python.texi:3961: warning: @ref node name should not contain `.'
/home/alpha/installation/rocket-chip/riscv-tools/riscv-gnu-toolchain/build/../riscv-binutils-gdb/gdb/doc/python.texi:3997: warning: @ref node name should not contain `.'
*** This configuration is not supported in the following subdirectories:
     target-libquadmath target-libatomic target-libcilkrts target-libvtv target-libada target-libgfortran target-liboffloadmic target-libssp
    (Any other directories should still work fine.)
make[3]: *** No rule to make target '../libiberty/libiberty.a', needed by 'full-stamp'.  Stop.
make[2]: *** [all-fixincludes] Error 2
make[1]: *** [all] Error 2
make: *** [stamps/build-gcc-newlib] Error 2
What do you suggest i do ? Thank you
 
Old 03-27-2017, 08:08 AM   #19
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 16,809

Rep: Reputation: 3354Reputation: 3354Reputation: 3354Reputation: 3354Reputation: 3354Reputation: 3354Reputation: 3354Reputation: 3354Reputation: 3354Reputation: 3354Reputation: 3354
Re #18.

May be the OS got corrupted by the gcc-6 install ? Or by something else installed.

VirtualBox : Easy to install a new clean OS, e.g. another Ubuntu 16.04 - amd64.
 
Old 03-28-2017, 04:56 AM   #20
riscv
Member
 
Registered: Mar 2017
Posts: 34

Original Poster
Rep: Reputation: Disabled
I installed ubuntu 14.04 now with gcc-4.8. Still getting some errors related to cloning from git (not g++ !)

Actually, for the libiberty issue, here is the git i clone the toolchain from: https://github.com/riscv/riscv-gnu-toolchain. Some folders are empty. And i got an error saying for example (among others) that riscv-gnu-toolchain/riscv-binutils-gdb wasn't found, and when i looked it up, i found this: https://github.com/riscv/https://git...v-binutils-gdb, which contains libiberty.

Should i clone each branch at a time when i get "not found" errors ? Otherwise, why isn't --recursive doing this ?

As for the "g++ command not found error", the solution as knudfl indicated is to work with ubuntu 14.04 and gcc-4.8 and later. So, it is solved.

Last edited by riscv; 03-28-2017 at 04:59 AM.
 
  


Reply

Tags
riscv


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
Installation (Linux) RISCV GNU Toolchain error: C compiler cannot create executables, recipe for target 'configure-target-libgomp' failed riscv Linux - Newbie 2 03-23-2017 09:36 AM
make: CC: Command not found make: *** [main.o] Error 127 on opensuse 11.3 Leo89 Linux - Newbie 6 11-30-2012 06:13 PM
NS-2.29 Make error (make: g++34: Command not found) avi2936 Linux - Newbie 8 09-17-2012 04:32 PM
Unable to compile C++ programs.make:g++ command not found error.Error 127 PrathuD Programming 3 03-16-2009 01:44 PM
make: cc: command not found make: *** [gzip.o]error 127 zyjk Linux - Newbie 5 02-08-2002 10:58 AM

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

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