Building GCC cross-compiler for PowerPC AIX 7.1 - c

I'm just trying to build gcc cross-compiler for AIX7.1. Have successfully built binutils-2.25.1, but have problems with building gcc-6.3.0. It successfully compile target all-gcc but fails on compiling all-target-libgcc. I get this error:
In file included from /home/zakkurasov/aix-sysroot/usr/include/sys/inttypes.h:51:0,
from /home/zakkurasov/cross-aix/build-gcc/gcc/include-fixed/sys/types.h:70,
from /home/zakkurasov/cross-aix/build-gcc/gcc/include-fixed/stdio.h:489,
from ../../../../gcc-6.3.0/libgcc/../gcc/tsystem.h:87,
from ../../../../gcc-6.3.0/libgcc/libgcc2.c:27:
/home/zakkurasov/cross-aix/build-gcc/gcc/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory
# include_next <stdint.h>
^
compilation terminated.
Makefile:467: recipe for target '_lshrdi3.o' failed
make[4]: *** [_lshrdi3.o] Error 1
make[4]: Leaving directory '/home/zakkurasov/cross-aix/build-gcc/powerpc-ibm-aix7.1.0.0/pthread/libgcc'
Makefile:1161: recipe for target 'multi-do' failed
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory '/home/zakkurasov/cross-aix/build-gcc/powerpc-ibm-aix7.1.0.0/libgcc'
Makefile:118: recipe for target 'all-multi' failed
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory '/home/zakkurasov/cross-aix/build-gcc/powerpc-ibm-aix7.1.0.0/libgcc'
Makefile:12321: recipe for target 'all-target-libgcc' failed
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory '/home/zakkurasov/cross-aix/build-gcc'
Makefile:882: recipe for target 'all' failed
make: *** [all] Error 2
Configure with command:
../gcc-6.3.0/configure --prefix=$PREFIX --host=$MACHTYPE --build=$MACHTYPE --target=$TARGET --with-sysroot=$SYSROOT --with-gnu-as --with-gnu-ld --enable-multilib --enable-languages=c,c++ -v
where
$PREFIX=/opt/aix
$TARGET=powerpc-ibm-aix7.1.0.0
$MACHTYPE=x86_64-pc-linux-gnu
$SYSROOT contain includes and libs from AIX 7.1
Sorry, have checked and saw that files in $SYSROOT/usr just broken symbolic links. Replaced it with files, and get new error:
/home/zakkurasov/cross-aix/build-gcc/./gcc/xgcc -B/home/zakkurasov/cross-aix/build-gcc/./gcc/ -B/opt/aix/powerpc-ibm-aix7.1.0.0/bin/ -B/opt/aix/powerpc-ibm-aix7.1.0.0/lib/ -isystem /opt/aix/powerpc-ibm-aix7.1.0.0/include -isystem /opt/aix/powerpc-ibm-aix7.1.0.0/sys-include -g -O2 -maix64 -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -mlong-double-128 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -mlong-double-128 -I. -I. -I../../.././gcc -I../../../../gcc-6.3.0/libgcc -I../../../../gcc-6.3.0/libgcc/. -I../../../../gcc-6.3.0/libgcc/../gcc -I../../../../gcc-6.3.0/libgcc/../include -DHAVE_CC_TLS -DUSE_EMUTLS -o _mulsc3.o -MT _mulsc3.o -MD -MP -MF _mulsc3.dep -DL_mulsc3 -c ../../../../gcc-6.3.0/libgcc/libgcc2.c
/tmp/ccuoaSIc.s: Assembler messages:
/tmp/ccuoaSIc.s:545: Error: junk at end of line: `4'
/tmp/ccuoaSIc.s:548: Error: junk at end of line: `1'
Makefile:467: recipe for target '_mulsc3.o' failed

Related

How to Compile Openssl for linux-mips32 on a windows machine?

I have been struggling to build openssl for linux-mips32 using VS2015x native Tools.
I have set up perl and use the following command to configure:
perl Configure linux-mips32
--prefix=C:\Users\srivaspr\Downloads\openssl-1.0.2k.tar\openssl\builder
--openssldir=C:\Users\srivaspr\Downloads\openssl-1.0.2k.tar\openssl\builder
The configuration command works fine.
But when I use make command it gives the following error:
making all in crypto...
make[1]: Entering directory 'C:/Users/srivaspr/Downloads/openssl-1.0.2k.tar/openssl/crypto'
gcc -I. -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -mips2 -mabi=32 -O3 -Wall -DBN_DIV3W -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DAES_ASM -c -o cryptlib.o cryptlib.c
gcc: error: unrecognized argument in option '-mabi=32'
gcc: note: valid arguments to '-mabi=' are: ms sysv
gcc: error: unrecognized command line option '-mips2'
make[1]: *** [<builtin>: cryptlib.o] Error 1
make[1]: Leaving directory 'C:/Users/srivaspr/Downloads/openssl-1.0.2k.tar/openssl/crypto'
make: *** [Makefile:287: build_crypto] Error 1
I have searched through the internet multiple times but could not find anything relevant. Any help would be appreciated.

Fatal error: msgsps_common.h: No such file or directory

When I tried build my C project using MQTT (MOSQUITTO) I received this error: "
make all
Building file: ../mosquitto/test/msgsps_pub.c
Invoking: GCC C Compiler
gcc -I"/home/procifalus/workspace/C-Cplusplus/protheus/mosquitto" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"mosquitto/test/msgsps_pub.d" -MT"mosquitto/test/msgsps_pub.d" -o "mosquitto/test/msgsps_pub.o" "../mosquitto/test/msgsps_pub.c"
../mosquitto/test/msgsps_pub.c:9:27: fatal error: msgsps_common.h: No such file or directory
#include <msgsps_common.h>
^
compilation terminated.
mosquitto/test/subdir.mk:45: recipe for target 'mosquitto/test/msgsps_pub.o' failed
make: *** [mosquitto/test/msgsps_pub.o] Error 1".
Could someone help me ?

Building libical-1.0 on OS X fails

I'm trying to use libical for a C-project. Unfortunately, the make command gives me the following output:
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in design-data
make[2]: Nothing to be done for `all'.
Making all in doc
make[2]: Nothing to be done for `all'.
Making all in scripts
make[2]: Nothing to be done for `all'.
Making all in test-data
make[2]: Nothing to be done for `all'.
Making all in src
Making all in libical
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
/bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../src -I../../src -I../../src/libical -I../../src/libical -I. -DPACKAGE_DATA_DIR=\""/usr/local/libical/share/libical"\" -g -O2 -MT icalderivedparameter.lo -MD -MP -MF .deps/icalderivedparameter.Tpo -c -o icalderivedparameter.lo icalderivedparameter.c
mv -f .deps/icalderivedparameter.Tpo .deps/icalderivedparameter.Plo
mv: rename .deps/icalderivedparameter.Tpo to .deps/icalderivedparameter.Plo: No such file or directory
make[4]: *** [icalderivedparameter.lo] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
I'm not sure whats wrong here. I'm running OS X 10.9 and gcc.
gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
You must call ./bootstrap.
./bootstrap
./configure
make
make install
Bootstrap was the key for me.

Axis2/c error in instalaltion

My problem is the following one:
When installing Axis2/c under the guidance of http://petio.org/ws/web_services_page7.html , which seems to be an adjusted manual from the official site I have a problem right after executing the make command in terminal.
At exactly this point:
$ cd /tmp/axis/axis2c-src-1.6.0
$ ./configure --prefix=${AXIS2C_HOME} --enable-libxml2=yes
$ make
I get this error:
XXX#XXXPC:~/Tools/axis2c/axis2c-src-1.5.0$ make
make all-recursive
make[1]: Entering directory `/home/XXX/Tools/axis2c/axis2c-src-1.5.0'
Making all in util
make[2]: Entering directory `/home/XXX/Tools/axis2c/axis2c-src-1.5.0/util'
make all-recursive
make[3]: Entering directory `/home/XXX/Tools/axis2c/axis2c-src-1.5.0/util'
Making all in src
make[4]: Entering directory `/home/XXX/Tools/axis2c/axis2c-src-1.5.0/util/src'
Making all in platforms/unix
make[5]: Entering directory `/home/XXX/Tools/axis2c/axis2c-src-1.5.0/util/src/platforms/unix'
/bin/bash ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../include -I../../../include/platforms -I../../../include/platforms/unix -g -O2 -D_LARGEFILE64_SOURCE -ansi -Wall -Werror -Wno-implicit-function-declaration -D_GNU_SOURCE -MT uuid_gen_unix.lo -MD -MP -MF .deps/uuid_gen_unix.Tpo -c -o uuid_gen_unix.lo uuid_gen_unix.c
gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../include -I../../../include/platforms -I../../../include/platforms/unix -g -O2 -D_LARGEFILE64_SOURCE -ansi -Wall -Werror -Wno-implicit-function-declaration -D_GNU_SOURCE -MT uuid_gen_unix.lo -MD -MP -MF .deps/uuid_gen_unix.Tpo -c uuid_gen_unix.c -fPIC -DPIC -o .libs/uuid_gen_unix.o
**uuid_gen_unix.c: In function ‘axutil_uuid_gen_v1’:
uuid_gen_unix.c:62:20: error: variable ‘tv’ set but not used [-Werror=unused-but-set-variable]**
cc1: all warnings being treated as errors
make[5]: *** [uuid_gen_unix.lo] Error 1
make[5]: Leaving directory `/home/XXX/Tools/axis2c/axis2c-src-1.5.0/util/src/platforms/unix'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/XXX/Tools/axis2c/axis2c-src-1.5.0/util/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/XXX/Tools/axis2c/axis2c-src-1.5.0/util'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/XXX/Tools/axis2c/axis2c-src-1.5.0/util'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/XXX/Tools/axis2c/axis2c-src-1.5.0'
make: *** [all] Error 2
I am not able to understand the reason why this error is being produced.
Because 1.6.0 version is down, I am using the 1.5.0 source version of axis2/c from the official site : http://axis.apache.org/axis2/c/core/download.cgi .
I have additionally installed Apache2 and libxml2, OpenSSL, cURL, libiconv, and zlib.
libraries.
I need your help because I am trying to build a serious project.
Thanks in advance.
Link to mirror of original Axis2/C-1.6.0 source distribution is here.
The main problem is with -Werror flag.
To compile original Axis2/C with modern compiler you must remove -Werror string from build scripts. To do that run this command after unpacking tarball:
find -type f -name configure -exec sed -i '/CFLAGS/s/-Werror//g' {} \;
Then configure and make Axis2/C.
Note: Original Axis2/C-1.6.0 has many issues like memory leaks and crashes. Consider using Axis2/C unofficial project instead. Most critical Axis2/C-1.6.0's issues is fixed within that project.
Also it have additional features https://code.google.com/p/axis2c-unofficial/wiki/IssuesList like JSON support and enhanced CURL-based transport authentication (and some other features).
There is an manual on how to install Axis2/C unofficial on Linux.

Msys compile of C code

I'm not very familiar with compiling C code, especially on Windows using MinGW/Msys. Here is my problem. I am attempting to compile an open-source M3u8-segmenter C code for Windows. The open-source examples all deal with linux, but I have successfully compiled the code on my Mac OSX machine without a problem.
In Msys on Windows, the ./configure is successful, but once I do the Make, I get the following error. It appears to related to the signal.h include, but I'm not sure. Any insight would be appreciated.
make[1]: Entering directory `/home/install/m3u8-segmenter-master/tests'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/install/m3u8-segmenter-master/tests'
make[1]: Entering directory `/home/install/m3u8-segmenter-master'
gcc -DPACKAGE_NAME=\"m3u8-segmenter\" -DPACKAGE_TARNAME=\"m3u8-segmenter\" -DPAC
KAGE_VERSION=\"0.3\" -DPACKAGE_STRING=\"m3u8-segmenter\ 0.3\" -DPACKAGE_BUGREPOR
T=\"http://github.com/johnf/m3u8-segmenter/issues\" -DPACKAGE_URL=\"http://m3u8-
segmenter.inodes.org\" -DPACKAGE=\"m3u8-segmenter\" -DVERSION=\"0.3\" -DSTDC_HEA
DERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_
H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -
DHAVE_UNISTD_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SIGNAL_H=1 -DHAVE_GETOPT_H=1 -DHAVE
_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_STRRCHR=1 -D
HAVE_STRTOL=1 -I. -Ic:/msys/1.0/local/include -g -O2 -Wall -Wextra -Wdeclar
ation-after-statement -Wpointer-arith -funsigned-char -Werror -Wall -Wstrict-pro
totypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wcast-qual -Wneste
d-externs -Wshadow -Wbad-function-cast -Wwrite-strings -MT m3u8_segmenter-m3u8-
segmenter.o -MD -MP -MF .deps/m3u8_segmenter-m3u8-segmenter.Tpo -c -o m3u8_segme
nter-m3u8-segmenter.o `test -f 'm3u8-segmenter.c' || echo './'`m3u8-segmenter.c
m3u8-segmenter.c: In function 'main':
m3u8-segmenter.c:212:22: error: storage size of 'act' isn't known
m3u8-segmenter.c:413:5: error: implicit declaration of function 'sigaction' [-We
rror=implicit-function-declaration]
m3u8-segmenter.c:413:5: error: nested extern declaration of 'sigaction' [-Werror
=nested-externs]
m3u8-segmenter.c:212:22: error: unused variable 'act' [-Werror=unused-variable]
cc1.exe: all warnings being treated as errors
make[1]: *** [m3u8_segmenter-m3u8-segmenter.o] Error 1
make[1]: Leaving directory `/home/install/m3u8-segmenter-master'
make: *** [all-recursive] Error 1
To emulate UNIX on Windows, Cygwin is more appropriate than MSys/MinGW as pointed by this post

Resources