Has anyone built gcc 8.2.0 on OpenBSD 6.3? - gcc

I am getting the following error when I try to build gcc 8.2.0 on OpenBSD 6.3:
/bin/sh ./libtool --tag=CC --mode=compile /home/shane/gcc-8.2.0/host-i386-unknown-openbsd6.3/gcc/xgcc -B/home/shane/gcc-8.2.0/host-i386-unknown-openbsd6.3/gcc/ -B/opt/gcc-8.2.0/i386-unknown-openbsd6.3/bin/ -B/opt/gcc-8.2.0/i386-unknown-openbsd6.3/lib/ -isystem /opt/gcc-8.2.0/i386-unknown-openbsd6.3/include -isystem /opt/gcc-8.2.0/i386-unknown-openbsd6.3/sys-include -DHAVE_CONFIG_H -I../.././libatomic/config/x86 -I../.././libatomic/config/posix -I../.././libatomic -I. -march=i486 -mtune=i386 -fomit-frame-pointer -Wall -Werror -pthread -g -O2 -MT fence.lo -MD -MP -MF .deps/fence.Tpo -c -o fence.lo ../.././libatomic/fence.c
libtool: compile: /home/shane/gcc-8.2.0/host-i386-unknown-openbsd6.3/gcc/xgcc -B/home/shane/gcc-8.2.0/host-i386-unknown-openbsd6.3/gcc/ -B/opt/gcc-8.2.0/i386-unknown-openbsd6.3/bin/ -B/opt/gcc-8.2.0/i386-unknown-openbsd6.3/lib/ -isystem /opt/gcc-8.2.0/i386-unknown-openbsd6.3/include -isystem /opt/gcc-8.2.0/i386-unknown-openbsd6.3/sys-include -DHAVE_CONFIG_H -I../.././libatomic/config/x86 -I../.././libatomic/config/posix -I../.././libatomic -I. -march=i486 -mtune=i386 -fomit-frame-pointer -Wall -Werror -pthread -g -O2 -MT fence.lo -MD -MP -MF .deps/fence.Tpo -c ../.././libatomic/fence.c -fPIC -DPIC -o .libs/fence.o
../.././libatomic/fence.c:26:10: fatal error: stdatomic.h: No such file or directory
#include <stdatomic.h>
^~~~~~~~~~~~~
compilation terminated.
gmake[4]: *** [Makefile:491: fence.lo] Error 1
gmake[4]: Leaving directory '/home/shane/gcc-8.2.0/i386-unknown-openbsd6.3/libatomic'
gmake[3]: *** [Makefile:524: all-recursive] Error 1
gmake[3]: Leaving directory '/home/shane/gcc-8.2.0/i386-unknown openbsd6.3/libatomic'
gmake[2]: *** [Makefile:360: all] Error 2
gmake[2]: Leaving directory '/home/shane/gcc-8.2.0/i386-unknown-openbsd6.3/libatomic'
gmake[1]: *** [Makefile:21680: all-target-libatomic] Error 2
gmake[1]: Leaving directory '/home/shane/gcc-8.2.0'
gmake: *** [Makefile:943: all] Error 2
My process:
Install OpenBSD (using defaults)
Run syspatch
Add some packages:
# pkg_add wget
# pkg_add gmp mpfr libmpc
# pkg_add gmake
Get the source:
$ wget ftp://ftp.nluug.nl/mirror/languages/gcc/releases/gcc-8.2.0/gcc-8.2.0.tar.gz
$ tar xzf gcc-8.2.0.tar.gz
$ cd gcc-8.2.0
Build:
$ ./configure --prefix=/opt/gcc-8.2.0 --with-gmp=/usr/local --enable-languages=c,c++
$ gmake
This also fails with gcc 8.1.0 in a similar way.
I also tried using clang rather than gcc to build, like this:
$ CC=cc CXX=c++ ./configure --prefix=/opt/gcc-8.2.0 --with-gmp=/usr/local --enable-languages=c,c++
That made no difference, which makes some sense as apparently it is failing in stage 3 (gcc compiling itself again for a final check).
Annoyingly, there is a stdatomic.h file in the tarball:
$ find gcc-8.2.0 -name stdatomic.h
gcc-8.2.0/gcc/ginclude/stdatomic.h
So I have no idea what I am missing.
Has anyone successfully built this? How?

Related

`make` error : Nothing to be done for `all'

I'm trying to compile IRSTLM toolbox on my mac. I successfully run regenerate-makefiles.sh and ./configure but I get this error when executing make :
1 warning generated.
mv -f .deps/verify-caching.Tpo .deps/verify-caching.Po
/bin/sh ../libtool --tag=CXX --mode=link g++ -isystem/usr/include -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DMYCODESIZE=3 -g -O2 -o verify-caching verify-caching.o -lirstlm -lz
libtool: link: g++ -isystem/usr/include -W -Wall -ffor-scope - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DMYCODESIZE=3 -g -O2 -o .libs/verify-caching verify-caching.o -Wl,-bind_at_load /Users/alinejad/Downloads/irstlm- 5.80.08/trunk/src/.libs/libirstlm.dylib -lz
Making all in scripts
make[2]: Nothing to be done for `all'.
Making all in doc
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all-am'.
I've already checked tab in 'all' command.

Beaglebone: gcc include path error while trying to build using 'make'

I am trying to build cmu pocketsphinx on my beaglebone black for speech recognition. I have downloaded the source code for sphinxbase and ran ./configure. Now, when I run 'make' I get the following errors:
Making all in src
make[1]: Entering directory `/home/root/Pocketsphinx/sphinxbase-0.8/src'
Making all in libsphinxbase
make[2]: Entering directory `/home/root/Pocketsphinx/sphinxbase-0.8/src/libsphinxbase'
Making all in util
make[3]: Entering directory `/home/root/Pocketsphinx/sphinxbase-0.8/src/libsphinxbase/util'
/bin/sh ../../../libtool --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../../include -I../../../include/sphinxbase -I../../../include -I../../../include -I/usr/include/python2.7 -I/usr/include/python2.7 -g -O2 -Wall -MT bitvec.lo -MD -MP -MF .deps/bitvec.Tpo -c -o bitvec.lo bitvec.c
libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../../include -I../../../include/sphinxbase -I../../../include -I../../../include "-I/usr/include/python2.7" -I/usr/include/python2.7 -g -O2 -Wall -MT bitvec.lo -MD -MP -MF .deps/bitvec.Tpo -c bitvec.c -fPIC -DPIC -o .libs/bitvec.o
gcc: error: -I/usr/include/python2.7: No such file or directory
make[3]: *** [bitvec.lo] Error 1
make[3]: Leaving directory `/home/root/Pocketsphinx/sphinxbase-0.8/src/libsphinxbase/util'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/root/Pocketsphinx/sphinxbase-0.8/src/libsphinxbase'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/root/Pocketsphinx/sphinxbase-0.8/src'
make: *** [all-recursive] Error 1
I have checked under /usr/include and I can see python2.7 folder there. But, in the above it says that gcc can not find the python2.7 directory. I am kind of lost. Any help would be appreciated.
Thanks
GCC is interpreting that argument as the name of a file to be compiled, not a -I option. I find it exceedingly odd that it's putting quotes around one of the arguments. My suspicion is that this is because one of the characters in that argument is not a standard ASCII character. For example maybe you've used a different dash character (not ASCII code 45 / hex 0x2d, but instead some other character code that shows up sort of like a dash).

Building Lua 5.0 on 64bit Mac

For compatibility/legacy reasons I need to build the Lua compiler (luac) from version 5.0, on my 64bit Intel Mac. (5.1 or later can't be used.)
Dev tools installed through Xcode 4.6's Preferences window.
After I 'cd' in to the Lua directory, I issue the command 'make'.
cd include; make all
make[1]: Nothing to be done for `all'.
cd src; make all
make[1]: Nothing to be done for `all'.
cd src/lib; make all
make[1]: Nothing to be done for `all'.
cd src/luac; make all
gcc -o ../../bin/luac luac.o print.o lopcodes.o -L../../lib -llua -llualib -lm
Undefined symbols for architecture x86_64:
"_UNUSED", referenced from:
_writer in luac.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [../../bin/luac] Error 1
make: *** [all] Error 2
I do not know how to configure the make process for x86_64. Could someone please step me through it?
Thanks.
It works for me, but the output below is different from yours:
...
cd src/luac; make all
gcc -O2 -Wall -I../../include -I.. -c -o luac.o luac.c
gcc -O2 -Wall -I../../include -I.. -c -o print.o print.c
gcc -o lopcodes.o -c -O2 -Wall -I../../include -I.. -DLUA_OPNAMES ../lopcodes.c
gcc -o ../../bin/luac luac.o print.o lopcodes.o -L../../lib -llua -llualib -lm
cd src/lua; make all
gcc -O2 -Wall -I../../include -c -o lua.o lua.c
Try make clean all at the top level first.

Cloog-ppl make error

I'm trying to install cloog-ppl 0.15-11 in my 64 bit ubuntu 10.10. I get the following error during make. I guess it is wrt linking.
gcc -DHAVE_CONFIG_H -I. -I./include/cloog -I./include -I./include -Wall -fomit-frame-pointer -g -O2 -MT cloog.o -MD -MP -MF .deps/cloog.Tpo -c -o cloog.o `test -f 'source/cloog.c' || echo './'`source/cloog.c
mv -f .deps/cloog.Tpo .deps/cloog.Po
/bin/bash ./libtool --tag=CC --mode=link gcc -Wall -fomit-frame-pointer -g -O2 -o cloog cloog.o libcloog.la -lgmp -lppl_c -lppl -lgmpxx
libtool: link: gcc -Wall -fomit-frame-pointer -g -O2 -o .libs/cloog cloog.o ./.libs/libcloog.so /usr/lib/libgmp.so -lppl_c -lppl /usr/lib/libgmpxx.so
//usr/local/lib/libppl_c.so: undefined reference to `std::__detail::_List_node_base::_M_unhook()#GLIBCXX_3.4.15'
//usr/local/lib/libppl_c.so: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)#GLIBCXX_3.4.15'
//usr/local/lib/libppl_c.so: undefined reference to `std::__detail::_List_node_base::swap(std::__detail::_List_node_base&, std::__detail::_List_node_base&)#GLIBCXX_3.4.15'
//usr/local/lib/libppl_c.so: undefined reference to `std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, std::__detail::_List_node_base*)#GLIBCXX_3.4.15'
collect2: ld returned 1 exit status
make[1]: *** [cloog] Error 1
make[1]: Leaving directory `/home/praveen/cloog-ppl-0.15.11'
make: *** [all-recursive] Error 1
Can some one help me out on this ?
I have the same problem that I worked for a whole day!! I have a hit, as least this bug disappeared.
When it refers to GLIBCXX_3.4.15 it means that you are using a g++ or gcc with the library not providing the functions or classes you need, very likely 4.4 or 4.5. I changed my g++ and gcc to 4.6 and the problem was solved. For some references, you can check out the following:
How standard lib linked by libstdc++.so.6
Notice: I only get libstdc++.so.5 in /usr/lib when I have g++-4.5 installed. I think libstdc++ is the library that g++ and gcc used.
for changing the compiler version in Linux, see the following link:
Upgrade your compiler
Hope it helps!

Watir will not install with XP x86 or Win 7 x64. Getting error building native extension for the FFI gem

I am currently trying to install watir on my PC but currently hitting the errors below and I cannot think why this is happening?
I am following the steps below to install:
Download ruby 1.9.2:
http://www.ruby-lang.org/en/downloads/
Install.
Download RubyGems:
http://rubygems.org/pages/download
Install.
Download the DevKit so that native extensions can be built:
ruby dk.rb init
ruby dk.rb review
ruby dk.rb install
gem update --system (or to do more quickly: gem update --system --no-rdoc --no-ri)
gem install watir
When I do this all I get is the error log below. Does anyone know how I can get Watir to install please?
C:\Documents and Settings\IE User\Desktop\Ruby and Eclipse>gem install watir
Fetching: win32-api-1.4.8-x86-mingw32.gem (100%)
Fetching: windows-api-0.4.0.gem (100%)
Fetching: windows-pr-1.2.1.gem (100%)
Fetching: win32-process-0.6.5.gem (100%)
Fetching: xml-simple-1.1.1.gem (100%)
Fetching: hoe-2.12.4.gem (100%)
Fetching: s4t-utils-1.0.4.gem (100%)
WARNING: s4t-utils-1.0.4 has an invalid nil value for #cert_chain
Fetching: builder-3.0.0.gem (100%)
Fetching: user-choices-1.1.6.1.gem (100%)
Fetching: commonwatir-2.0.4.gem (100%)
Fetching: nokogiri-1.5.0-x86-mingw32.gem (100%)
Fetching: ffi-1.0.11.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing watir:
ERROR: Failed to build gem native extension.
C:/Ruby192/bin/ruby.exe extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include... no
checking for rb_thread_blocking_region()... yes
checking for ruby_thread_has_gvl_p()... yes
checking for ruby_native_thread_p()... yes
checking for rb_thread_call_with_gvl()... yes
creating extconf.h
creating Makefile
make
C:/Ruby192/bin/ruby -e "puts 'EXPORTS', 'Init_ffi_c'" > ffi_c-i386-mingw32.def
Configuring libffi
make -C "/c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi"
make[1]: Entering directory /c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/
ffi_c/libffi'
make "AR_FLAGS=" "CC_FOR_BUILD=" "CFLAGS=" "CXXFLAGS=" "CFLAGS_FOR_BUILD=" "CFLA
GS_FOR_TARGET=" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c
-m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -
c" "JC1FLAGS=" "LDFLAGS=" "LIBCFLAGS=" "LIBCFLAGS_FOR_TARGET=" "MAKE=make" "MAKE
INFO=/bin/sh /c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi/mis
sing --run makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "RUNTESTFLAGS=" "SHELL=/b
in/sh" "exec_prefix=/usr/local" "infodir=/usr/local/share/info" "libdir=/usr/loc
al/lib" "prefix=/usr/local" "AR=ar" "AS=as" "CC=gcc" "CXX=g++" "LD=c:/documents
and settings/ie user/desktop/ruby and eclipse/mingw/mingw32/bin/ld.exe" "NM=/usr
/mingw/bin/nm" "RANLIB=ranlib" "DESTDIR=" all-recursive
make[2]: Entering directory/c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/
ffi_c/libffi'
Making all in include
make[3]: Entering directory /c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/
ffi_c/libffi/include'
make[3]: Nothing to be done forall'.
make[3]: Leaving directory /c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/f
fi_c/libffi/include'
Making all in testsuite
make[3]: Entering directory/c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/
ffi_c/libffi/testsuite'
make[3]: Nothing to be done for all'.
make[3]: Leaving directory/c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/f
fi_c/libffi/testsuite'
Making all in man
make[3]: Entering directory /c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/
ffi_c/libffi/man'
make[3]: Nothing to be done forall'.
make[3]: Leaving directory /c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/f
fi_c/libffi/man'
make[3]: Entering directory/c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/
ffi_c/libffi'
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./inc
lude -Iinclude -I./src -Wall -g -fexceptions -c -o src/debug.lo src/debug.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wa
ll -g -fexceptions -c src/debug.c -DDLL_EXPORT -DPIC -o src/.libs/debug.o
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./inc
lude -Iinclude -I./src -Wall -g -fexceptions -c -o src/prep_cif.lo src/prep_ci
f.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wa
ll -g -fexceptions -c src/prep_cif.c -DDLL_EXPORT -DPIC -o src/.libs/prep_cif.o
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./inc
lude -Iinclude -I./src -Wall -g -fexceptions -c -o src/types.lo src/types.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wa
ll -g -fexceptions -c src/types.c -DDLL_EXPORT -DPIC -o src/.libs/types.o
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./inc
lude -Iinclude -I./src -Wall -g -fexceptions -c -o src/raw_api.lo src/raw_api.
c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wa
ll -g -fexceptions -c src/raw_api.c -DDLL_EXPORT -DPIC -o src/.libs/raw_api.o
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./inc
lude -Iinclude -I./src -Wall -g -fexceptions -c -o src/java_raw_api.lo src/jav
a_raw_api.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wa
ll -g -fexceptions -c src/java_raw_api.c -DDLL_EXPORT -DPIC -o src/.libs/java_r
aw_api.o
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./inc
lude -Iinclude -I./src -Wall -g -fexceptions -c -o src/closures.lo src/closure
s.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wa
ll -g -fexceptions -c src/closures.c -DDLL_EXPORT -DPIC -o src/.libs/closures.o
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./inc
lude -Iinclude -I./src -Wall -g -fexceptions -c -o src/x86/ffi.lo src/x86/ffi.
c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -Wa
ll -g -fexceptions -c src/x86/ffi.c -DDLL_EXPORT -DPIC -o src/x86/.libs/ffi.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iin
clude -I./src -I. -I./include -Iinclude -I./src -c -o src/x86/win32.lo src/x86
/win32.S
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -I.
-I./include -Iinclude -I./src -c src/x86/win32.S -DDLL_EXPORT -DPIC -o src/x86
/.libs/win32.o
/bin/sh ./libtool --tag=CC --mode=link gcc -Wall -g -fexceptions -version-inf
o grep -v '^#' ./libtool-version -no-undefined -o libffi.la -rpath /usr/local
/lib src/debug.lo src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.l
o src/closures.lo src/x86/ffi.lo src/x86/win32.lo
libtool: link: gcc -o .libs/libffi.dll.a src/.libs/debug.o src/.libs/prep_cif.o
src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closur
es.o src/x86/.libs/ffi.o src/x86/.libs/win32.o echo "X" | /usr/bin/sed -e 1
s/^X// -e 's/ -lc$//' -link -dll
c:/documents and settings/ie user/desktop/ruby and eclipse/mingw/bin/../lib/gcc/
mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -link
collect2: ld returned 1 exit status
make[3]: *** [libffi.la] Error 1
make[3]: Leaving directory /c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/f
fi_c/libffi'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory/c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/f
fi_c/libffi'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/f
fi_c/libffi'
make: *** ["/c/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/libffi"/.li
bs/libffi_convenience.a] Error 2
Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.1
1 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/ffi-1.0.11/ext/ffi_c/gem_m
ake.out
I am totally at a loss as to how to rectify this. I have tried this on both XP x86 and Win 7 X64 to no avail.
Thanks in advance
Andy
the later versions of FFI have been a source of problems for some, both because they no longer include a native windows version and have to build one on the fly, but also due to some incompatabilities with watir or webdrivers
Try doing this
gem uninstall ffi
(just in case there is anything that managhed to get installed)
gem install ffi -v 1.0.9
Then install watir or watir-webdriver
Update:
The latest versions of FFI work fine with Watir and Watir-Webdriver, however do not come 'precompiled' as earlier versions did. So to install them on a PC If you do not already have it, you will need to get Devkit. Once you have devkit installed and have run the setup scripts for it, you can use gem install ffi to get the latest FFI gem installed and it should work just fine.
I have updated my instructions on how to install Watir on Windows. If you follow them you will be able to install the latest versions of Ruby, Watir and ffi.
https://github.com/zeljkofilipin/watirbook/blob/master/installation/windows.md

Resources