riscvarchive / riscv-fesvr

RISC-V Frontend Server
Other
62 stars 83 forks source link

openbsd: gmake: ../scripts/vcs-version.sh: Command not found #61

Closed hakrdinesh closed 5 years ago

hakrdinesh commented 5 years ago

When compiling riscv-fesvr on OpenBSD 6.4

ob1$ gmake gmake: ../scripts/vcs-version.sh: Command not found c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/tmp/riscv\" -I. -I../fesvr -c ../fesvr/elfloader.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/tmp/riscv\" -I. -I../fesvr -c ../fesvr/htif.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/tmp/riscv\" -I. -I../fesvr -c ../fesvr/memif.cc ^Cgmake: *** [Makefile:310: memif.o] Interrupt

ob1$ head ../scripts/vcs-version.sh #!/bin/bash #========================================================================= # vcs-version.sh [options] [src-dir] #========================================================================= # # -h Display this message # -v Verbose mode # # This script will create a version string by querying a version control # system. The string is appropriate for use in installations and ob1$ `

hakrdinesh commented 5 years ago

Problem is gone after

https://github.com/hakrdinesh/riscv-fesvr/commit/d9af0253a34adb4f81ae20cd0f2ac536d62412c1

Builds fine on OpenBSD 6.4

bash-4.4$ script build.out Script started, output file is build.out ob1$ pwd /home/dt/riscv-fesvr/build ob1$ cat /home/dt/ENV
export RISCV=/home/dt/r5 export CC=cc export CXX=c++ ob1$ ../configure --prefix=/home/dt/r5
checking build system type... x86_64-unknown-openbsd6.4 checking host system type... x86_64-unknown-openbsd6.4 checking for gcc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking whether we are using the GNU C++ compiler... yes checking whether c++ accepts -g... yes checking for ar... ar checking for ranlib... ranlib checking for a BSD-compatible install... /usr/bin/install -c checking how to run the C preprocessor... cc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes configure: configuring default subproject : fesvr checking for pthread_create in -lpthread... yes configure: creating ./config.status config.status: creating fesvr.mk config.status: creating Makefile config.status: creating riscv-fesvr.pc config.status: creating config.h ob1$ gmake
c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/elfloader.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/htif.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/memif.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/dtm.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/syscall.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/device.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/rfb.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/context.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/htif_pthread.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/htif_hexwriter.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/dummy.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/option_parser.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/term.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/tsi.cc In file included from ../fesvr/tsi.cc:1: ../fesvr/tsi.h:40:10: warning: 'chunk_align' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] size_t chunk_align() { return 4; } ^ ../fesvr/htif.h:36:18: note: overridden virtual function is here virtual size_t chunk_align() = 0; ^ In file included from ../fesvr/tsi.cc:1: ../fesvr/tsi.h:41:10: warning: 'chunk_max_size' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] size_t chunk_max_size() { return 1024; } ^ ../fesvr/htif.h:37:18: note: overridden virtual function is here virtual size_t chunk_max_size() = 0; ^ 2 warnings generated. c++ -L. -Wl,-rpath,/home/dt/r5/lib -shared -o libfesvr.so elfloader.o htif.o memif.o dtm.o syscall.o device.o rfb.o context.o htif_pthread.o htif_hexwriter.o dummy.o option_parser.o term.o tsi.o -lpthread c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/elf2hex.cc c++ -L. -Wl,-rpath,/home/dt/r5/lib -o elf2hex elf2hex.o -lfesvr -lpthread ./libfesvr.so: warning: strcpy() is almost always misused, please use strlcpy() ob1$ gmake install ../scripts/mk-install-dirs.sh /home/dt/r5/include/fesvr for file in ../fesvr/elf.h ../fesvr/elfloader.h ../fesvr/htif.h ../fesvr/dtm.h ../fesvr/memif.h ../fesvr/syscall.h ../fesvr/context.h ../fesvr/htif_pthread.h ../fesvr/htif_hexwriter.h ../fesvr/option_parser.h ../fesvr/term.h ../fesvr/device.h ../fesvr/rfb.h ../fesvr/tsi.h; \ do \ /usr/bin/install -c -m 444 $file /home/dt/r5/include/fesvr; \ done ../scripts/mk-install-dirs.sh /home/dt/r5/lib for file in libfesvr.so; \ do \ /usr/bin/install -c -m 644 $file /home/dt/r5/lib; \ done ../scripts/mk-install-dirs.sh /home/dt/r5/bin for file in elf2hex; \ do \ /usr/bin/install -c -m 555 $file /home/dt/r5/bin; \ done ../scripts/mk-install-dirs.sh /home/dt/r5/lib/pkgconfig/ for file in riscv-fesvr.pc; \ do \ /usr/bin/install -c -m 444 $file /home/dt/r5/lib/pkgconfig/; \ done ob1$ ^D Script done, output file is build.out bash-4.4$ bash-4.4$ uname -a OpenBSD ob1.my.domain 6.4 GENERIC#349 amd64 bash-4.4$

hakrdinesh commented 5 years ago

Ubuntu 16.04 LTS has no regression with that change.

dt@ub1:~/riscv-fesvr$ col -b < ubuntu.out > u.out dt@ub1:~/riscv-fesvr$ cat u.out Script started on Mon Feb 4 05:16:47 2019 0;dt@ub1: ~/riscv-fesvr01;32mdt@ub100m:01;34m~/riscv-fesvr00m$ Kmkdir -p build 0;dt@ub1: ~/riscv-fesvr01;32mdt@ub100m:01;34m~/riscv-fesvr00m$ cd build 0;dt@ub1: ~/riscv-fesvr/build01;32mdt@ub100m:01;34m~/riscv-fesvr/build00m$ ls 0;dt@ub1: ~/riscv-fesvr/build01;32mdt@ub100m:01;34m~/riscv-fesvr/build00m$ echo $RISCV

0;dt@ub1: ~/riscv-fesvr/build01;32mdt@ub100m:01;34m~/riscv-fesvr/build00m$ export RISCV=/home/dt/risKK5 0;dt@ub1: ~/riscv-fesvr/build01;32mdt@ub100m:01;34m~/riscv-fesvr/build00m$ KunamKuname -a Linux ub1 4.4.0-131-generic #157-Ubuntu SMP Thu Jul 12 15:51:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux 0;dt@ub1: ~/riscv-fesvr/build01;32mdt@ub100m:01;34m~/riscv-fesvr/build00m$ g_K++ --version g++ (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

0;dt@ub1: ~/riscv-fesvr/build01;32mdt@ub100m:01;34m~/riscv-fesvr/build00m$ gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

0;dt@ub1: ~/riscv-fesvr/build01;32mdt@ub100m:01;34m~/riscv-fesvr/build00m$ KKechon$PAKTH /home/dt/bin:/home/dt/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 0;dt@ub1: ~/riscv-fesvr/build01;32mdt@ub100m:01;34m~/riscv-fesvr/build00m$ K../configure --prefix=/home/dt/dinesK$RISCV checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for ar... ar checking for ranlib... ranlib checking for a BSD-compatible install... /usr/bin/install -c checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes configure: configuring default subproject : fesvr checking for pthread_create in -lpthread... yes configure: creating ./config.status config.status: creating fesvr.mk config.status: creating Makefile config.status: creating riscv-fesvr.pc config.status: creating config.h 0;dt@ub1: ~/riscv-fesvr/build01;32mdt@ub100m:01;34m~/riscv-fesvr/build00m$ make g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/elfloader.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/htif.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/memif.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/dtm.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/syscall.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/device.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/rfb.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/context.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/htif_pthread.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/htif_hexwriter.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/dummy.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/option_parser.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/term.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/tsi.cc g++ -L. -Wl,-rpath,/home/dt/r5/lib -shared -o libfesvr.so elfloader.o htif.o memif.o dtm.o syscall.o device.o rfb.o context.o htif_pthread.o htif_hexwriter.o dummy.o option_parser.o term.o tsi.o -lpthread g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/elf2hex.cc g++ -L. -Wl,-rpath,/home/dt/r5/lib -o elf2hex elf2hex.o -lfesvr -lpthread 0;dt@ub1: ~/riscv-fesvr/build01;32mdt@ub100m:01;34m~/riscv-fesvr/build00m$ make install ../scripts/mk-install-dirs.sh /home/dt/r5/include/fesvr mkdir /home/dt/r5/include mkdir /home/dt/r5/include/fesvr for file in ../fesvr/elf.h ../fesvr/elfloader.h ../fesvr/htif.h ../fesvr/dtm.h ../fesvr/memif.h ../fesvr/syscall.h ../fesvr/context.h ../fesvr/htif_pthread.h ../fesvr/htif_hexwriter.h ../fesvr/option_parser.h ../fesvr/term.h ../fesvr/device.h ../fesvr/rfb.h ../fesvr/tsi.h; \ do \ /usr/bin/install -c -m 444 $file /home/dt/r5/include/fesvr; \ done ../scripts/mk-install-dirs.sh /home/dt/r5/lib mkdir /home/dt/r5/lib for file in libfesvr.so; \ do \ /usr/bin/install -c -m 644 $file /home/dt/r5/lib; \ done ../scripts/mk-install-dirs.sh /home/dt/r5/bin mkdir /home/dt/r5/bin for file in elf2hex; \ do \ /usr/bin/install -c -m 555 $file /home/dt/r5/bin; \ done ../scripts/mk-install-dirs.sh /home/dt/r5/lib/pkgconfig/ mkdir /home/dt/r5/lib/pkgconfig for file in riscv-fesvr.pc; \ do \ /usr/bin/install -c -m 444 $file /home/dt/r5/lib/pkgconfig/; \ done dt@ub1: ~/riscv-fesvr/build$ git log | head commit d9af0253a34adb4f81ae20cd0f2ac536d62412c1 Author: Dinesh Thirumurthy dinesh.thirumurthy@gmail.com Date: Mon Feb 4 10:20:35 2019 +0530

bash can be at /usr/local/bin, it is so in openbsd, use env to invoke bash

commit 8d108a0a647901550d95925549337c2c3aec9ac8 Author: Andrew Waterman aswaterman@gmail.com Date: Mon Oct 1 21:58:09 2018 -0700

dt@ub1: ~/riscv-fesvr/build$ git remote -v origin https://github.com/hakrdinesh/riscv-fesvr (fetch) origin https://github.com/hakrdinesh/riscv-fesvr (push) 0;dt@ub1: ~/riscv-fesvr/build01;32mdt@ub100m:01;34m~/riscv-fesvr/build00m$ git status On branch master Your branch is up-to-date with 'origin/master'. Untracked files: (use "git add ..." to include in what will be committed)

31m../ubuntu.outm

nothing added to commit but untracked files present (use "git add" to track) 0;dt@ub1: ~/riscv-fesvr/build01;32mdt@ub100m:01;34m~/riscv-fesvr/build00m$ exit

hakrdinesh commented 5 years ago

FreeBSD 13.0-current works fine. No regression.

[dt@freebsd ~/riscv-fesvr]$ script freebsd.out Script started, output file is freebsd.out [dt@freebsd ~/riscv-fesvr]$ uname -a FreeBSD freebsd 13.0-CURRENT FreeBSD 13.0-CURRENT r342707 GENERIC amd64 [dt@freebsd ~/riscv-fesvr]$ cd build [dt@freebsd ~/riscv-fesvr/build]$ ls [dt@freebsd ~/riscv-fesvr/build]$ pwd /home/dt/riscv-fesvr/build [dt@freebsd ~/riscv-fesvr/build]$ ls [dt@freebsd ~/riscv-fesvr/build]$ . ~/ENV RISCV=/home/dt/r5 CC=cc CXX=c++ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/dt/bin [dt@freebsd ~/riscv-fesvr/build]$ ../configure --prefix=$RISCV checking build system type... x86_64-unknown-freebsd13.0 checking host system type... x86_64-unknown-freebsd13.0 checking for gcc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking whether we are using the GNU C++ compiler... yes checking whether c++ accepts -g... yes checking for ar... ar checking for ranlib... ranlib checking for a BSD-compatible install... /usr/bin/install -c checking how to run the C preprocessor... cc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes configure: configuring default subproject : fesvr checking for pthread_create in -lpthread... yes configure: creating ./config.status config.status: creating fesvr.mk config.status: creating Makefile config.status: creating riscv-fesvr.pc config.status: creating config.h [dt@freebsd ~/riscv-fesvr/build]$ gmake c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/elfloader.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/htif.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/memif.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/dtm.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/syscall.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/device.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/rfb.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/context.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/htif_pthread.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/htif_hexwriter.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/dummy.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/option_parser.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/term.cc c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/tsi.cc In file included from ../fesvr/tsi.cc:1: ../fesvr/tsi.h:40:10: warning: 'chunk_align' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] size_t chunk_align() { return 4; } ^ ../fesvr/htif.h:36:18: note: overridden virtual function is here virtual size_t chunk_align() = 0; ^ In file included from ../fesvr/tsi.cc:1: ../fesvr/tsi.h:41:10: warning: 'chunk_max_size' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] size_t chunk_max_size() { return 1024; } ^ ../fesvr/htif.h:37:18: note: overridden virtual function is here virtual size_t chunk_max_size() = 0; ^ 2 warnings generated. c++ -L. -Wl,-rpath,/home/dt/r5/lib -shared -o libfesvr.so elfloader.o htif.o memif.o dtm.o syscall.o device.o rfb.o context.o htif_pthread.o htif_hexwriter.o dummy.o option_parser.o term.o tsi.o -lpthread c++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/elf2hex.cc c++ -L. -Wl,-rpath,/home/dt/r5/lib -o elf2hex elf2hex.o -lfesvr -lpthread [dt@freebsd ~/riscv-fesvr/build]$ gmake install ../scripts/mk-install-dirs.sh /home/dt/r5/include/fesvr mkdir /home/dt/r5 mkdir /home/dt/r5/include mkdir /home/dt/r5/include/fesvr for file in ../fesvr/elf.h ../fesvr/elfloader.h ../fesvr/htif.h ../fesvr/dtm.h ../fesvr/memif.h ../fesvr/syscall.h ../fesvr/context.h ../fesvr/htif_pthread.h ../fesvr/htif_hexwriter.h ../fesvr/option_parser.h ../fesvr/term.h ../fesvr/device.h ../fesvr/rfb.h ../fesvr/tsi.h; \ do \ /usr/bin/install -c -m 444 $file /home/dt/r5/include/fesvr; \ done ../scripts/mk-install-dirs.sh /home/dt/r5/lib mkdir /home/dt/r5/lib for file in libfesvr.so; \ do \ /usr/bin/install -c -m 644 $file /home/dt/r5/lib; \ done ../scripts/mk-install-dirs.sh /home/dt/r5/bin mkdir /home/dt/r5/bin for file in elf2hex; \ do \ /usr/bin/install -c -m 555 $file /home/dt/r5/bin; \ done ../scripts/mk-install-dirs.sh /home/dt/r5/lib/pkgconfig/ mkdir /home/dt/r5/lib/pkgconfig for file in riscv-fesvr.pc; \ do \ /usr/bin/install -c -m 444 $file /home/dt/r5/lib/pkgconfig/; \ done [dt@freebsd ~/riscv-fesvr/build]$ exit

Script done, output file is freebsd.out

hakrdinesh commented 5 years ago

NetBSD 8.0/amd64 is also fine. No regression.

dt@nb80a:~$ script netbsd.out Script started, output file is netbsd.out dt@nb80a:~$ cd riscv-fesvr/ dt@nb80a:~/riscv-fesvr$ uname -a NetBSD nb80a 8.0 NetBSD 8.0 (GENERIC) #0: Tue Jul 17 14:59:51 UTC 2018 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64 dt@nb80a:~/riscv-fesvr$ . ~/ENV2 RISCV=/home/dt/r5 PKG_PATH=ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/8.0/All PATH=/r5/bin:/home/dt/.riscv-tools/bin:/home/dt/bin:/home/dt/.local/bin:/r5/bin:/usr/bin:/bin:/usr/pkg/bin:/usr/local/bin dt@nb80a:~/riscv-fesvr$ mkdir build dt@nb80a:~/riscv-fesvr$ cd build dt@nb80a:~/riscv-fesvr/build$ ../configure --prefix=$RISCV checking build system type... x86_64-unknown-netbsd8.0 checking host system type... x86_64-unknown-netbsd8.0 checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for ar... ar checking for ranlib... ranlib checking for a BSD-compatible install... /usr/bin/install -c checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes configure: configuring default subproject : fesvr checking for pthread_create in -lpthread... yes configure: creating ./config.status config.status: creating fesvr.mk config.status: creating Makefile config.status: creating riscv-fesvr.pc config.status: creating config.h dt@nb80a:~/riscv-fesvr/build$ gmake g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/elfloader.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/htif.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/memif.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/dtm.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/syscall.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/device.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/rfb.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/context.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/htif_pthread.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/htif_hexwriter.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/dummy.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/option_parser.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/term.cc g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/tsi.cc g++ -L. -Wl,-rpath,/home/dt/r5/lib -shared -o libfesvr.so elfloader.o htif.o memif.o dtm.o syscall.o device.o rfb.o context.o htif_pthread.o htif_hexwriter.o dummy.o option_parser.o term.o tsi.o -lpthread g++ -fPIC -MMD -MP -Wall -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I../fesvr -c ../fesvr/elf2hex.cc g++ -L. -Wl,-rpath,/home/dt/r5/lib -o elf2hex elf2hex.o -lfesvr -lpthread dt@nb80a:~/riscv-fesvr/build$ gmake install ../scripts/mk-install-dirs.sh /home/dt/r5/include/fesvr for file in ../fesvr/elf.h ../fesvr/elfloader.h ../fesvr/htif.h ../fesvr/dtm.h ../fesvr/memif.h ../fesvr/syscall.h ../fesvr/context.h ../fesvr/htif_pthread.h ../fesvr/htif_hexwriter.h ../fesvr/option_parser.h ../fesvr/term.h ../fesvr/device.h ../fesvr/rfb.h ../fesvr/tsi.h; \ do \ /usr/bin/install -c -m 444 $file /home/dt/r5/include/fesvr; \ done ../scripts/mk-install-dirs.sh /home/dt/r5/lib for file in libfesvr.so; \ do \ /usr/bin/install -c -m 644 $file /home/dt/r5/lib; \ done ../scripts/mk-install-dirs.sh /home/dt/r5/bin for file in elf2hex; \ do \ /usr/bin/install -c -m 555 $file /home/dt/r5/bin; \ done ../scripts/mk-install-dirs.sh /home/dt/r5/lib/pkgconfig/ for file in riscv-fesvr.pc; \ do \ /usr/bin/install -c -m 444 $file /home/dt/r5/lib/pkgconfig/; \ done dt@nb80a:~/riscv-fesvr/build$

hakrdinesh commented 5 years ago

So, OpenBSD 6.4, NetBSD 8.0, FreeBSD 13.0-current, Ubuntu 16.04 LTS work with

!/usr/bin/env bash

instead of

!/bin/bash

Interested in an OpenBSD port of spike.

Kindly look at my pull request.

https://github.com/riscv/riscv-fesvr/pull/62

Thanks very much.

aswaterman commented 5 years ago

Resolved by #62