Makefile crashed while making after pass the ./configure --host=mingw32 - c

Everyone: situation: MacOS with x86_64-w64-mingw32 compiling toolchain I tried to compile GDB for Windows from the source code of GDB. But, after ./configure, I got
/bin/sh ./libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Wno-format -I./../zlib -Iincludedir -D__USE_MINGW_ACCESS -release `cat libtool-soversion` -Llibdir -Wl,--stack,12582912 -o libbfd.la -rpath /usr/local/lib archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coff-bfd.lo compress.lo corefile.lo elf-properties.lo format.lo hash.lo init.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo section.lo simple.lo stab-syms.lo stabs.lo syms.lo targets.lo binary.lo ihex.lo srec.lo tekhex.lo verilog.lo `cat ofiles` -L./../zlib -lz
./libtool: line 5208: cd: libdir: No such file or directory
libtool: link: cannot determine absolute directory name of `libdir'
make[4]: *** [libbfd.la] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-bfd] Error 2
I am sure my MingW32 is fully built and capable.
x86_64-w64-mingw32-addr2line x86_64-w64-mingw32-dllwrap x86_64-w64-mingw32-gcc-ranlib x86_64-w64-mingw32-ld.bfd x86_64-w64-mingw32-size
x86_64-w64-mingw32-ar x86_64-w64-mingw32-elfedit x86_64-w64-mingw32-gcov x86_64-w64-mingw32-lto-dump x86_64-w64-mingw32-strings
x86_64-w64-mingw32-as x86_64-w64-mingw32-g++ x86_64-w64-mingw32-gcov-dump x86_64-w64-mingw32-nm x86_64-w64-mingw32-strip
x86_64-w64-mingw32-c++ x86_64-w64-mingw32-gcc x86_64-w64-mingw32-gcov-tool x86_64-w64-mingw32-objcopy x86_64-w64-mingw32-windmc
x86_64-w64-mingw32-c++filt x86_64-w64-mingw32-gcc-10.2.0 x86_64-w64-mingw32-gfortran x86_64-w64-mingw32-objdump x86_64-w64-mingw32-windres
x86_64-w64-mingw32-cpp x86_64-w64-mingw32-gcc-ar x86_64-w64-mingw32-gprof x86_64-w64-mingw32-ranlib
x86_64-w64-mingw32-dlltool x86_64-w64-mingw32-gcc-nm x86_64-w64-mingw32-ld x86_64-w64-mingw32-readelf
I install it via HomeBrew And here is the config for libdir in my Makefile
prefix = /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib
LDFLAGS = -Llibdir
...
"libdir=$(libdir)" \
...
Totally have no idea how to fix this. Any idea? Or if you need some more information to figure it out, just let me know.
And just download the source code of GDB, I think you could duplicate the same scenario.
./libtool: line 5208: cd: libdir: No such file or directory
libtool: link: cannot determine absolute directory name of `libdir'
make[4]: *** [libbfd.la] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-bfd] Error 2
make: *** [all] Error 2

As the command line and error message say, you give libtool not the right path.
The command line contains -Llibdir and the error message says "cannot determine absolute directory name of 'libdir'".
So you wrote your Makefile to use libdir literally and not as the variable as it should be. Change it into:
LDFLAGS = -L$(libdir)
or
LDFLAGS = -L${libdir}
There is no real difference between parentheses and braces, just don't mix them up. Helpful links are:
The difference between parentheses and curly braces in GNU Make and
What's the difference between parenthesis $() and curly bracket ${} syntax in Makefile?

Related

Windows installation error for postgresql. Error in make command

I am new to postgresql. I want to install postgresql through source code in windows. I am using MinGW and msys for installation. Configure command is working fine with me. When i execute make command I am getting errors. Would any one please help me to rectify these errors.
[gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -I../../../../src/include -I./src/include/port/win32 -DEXEC_BACKEND -I/home/roopteja.itha/openssl/include -I/home/roopteja.itha/uuid "-I../../../../src/include/port/win32" -DBUILDING_DLL -c -o spgtextproc.o spgtextproc.c
In file included from ../../../../src/include/c.h:101:0,
from ../../../../src/include/postgres.h:47,
from spgtextproc.c:40:
../../../../src/include/pg_config_os.h:333:18: error: unknown type name '_locale_t'
#define locale_t _locale_t
^
../../../../src/include/utils/pg_locale.h:69:9: note: in expansion of macro 'locale_t'
typedef locale_t pg_locale_t;
^~~~~~~~
make[4]: *** [spgtextproc.o] Error 1
make[4]: Leaving directory `/home/roopteja.itha/postgresql-9.5.10/src/backend/access/spgist'
make[3]: *** [spgist-recursive] Error 2
make[3]: Leaving directory `/home/roopteja.itha/postgresql-9.5.10/src/backend/access'
make[2]: *** [access-recursive] Error 2
make[2]: Leaving directory `/home/roopteja.itha/postgresql-9.5.10/src/backend'
make[1]: *** [all-backend-recurse] Error 2
make[1]: Leaving directory `/home/roopteja.itha/postgresql-9.5.10/src'
make: *** [all-src-recurse] Error 2]
I am not able resolve this issue. Would anyone suggest necessary implementations.
The 'locale_t' type is defined in xlocale.h. The pg_locale.h has a condition before including xlocale.h One of the conditions might not be satisfied, so your xlocale.h is not included yet. Something like this.
#ifndef _PG_LOCALE_
#define _PG_LOCALE_
#if defined(LOCALE_T_IN_XLOCALE) || defined(WCSTOMBS_L_IN_XLOCALE)
#include <xlocale.h>
#endif
#ifdef USE_ICU
#include <unicode/ucol.h>
#endif

fatal error: 'endian.h' file not found

Trying to compile C program, every time I run make or gmake as recommended I get this error.
$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src all
gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0 -Iinclude -c -o osdep/radiotap/radiotap.o osdep/radiotap/radiotap.c
In file included from osdep/radiotap/radiotap.c:17:
osdep/radiotap/platform.h:6:10: fatal error: 'endian.h' file not found
#include <endian.h>
^
1 error generated.
make[1]: *** [osdep/radiotap/radiotap.o] Error 1
make: *** [all] Error 2
$ gmake
gmake -C src all
gmake[1]: Entering directory '/Users/silent/Desktop/aircr-1.2-rc1/src'
gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0 -Iinclude -c -o osdep/radiotap/radiotap.o osdep/radiotap/radiotap.c
In file included from osdep/radiotap/radiotap.c:17:
osdep/radiotap/platform.h:6:10: fatal error: 'endian.h' file not found
#include <endian.h>
^
1 error generated.
<builtin>: recipe for target 'osdep/radiotap/radiotap.o' failed
gmake[1]: *** [osdep/radiotap/radiotap.o] Error 1
gmake[1]: Leaving directory '/Users/silent/Desktop/aircr-1.2-rc1/src'
Makefile:25: recipe for target 'all' failed
gmake: *** [all] Error 2
According to some forms online recommended to check the file in this location ~/usr/include/machine but doesn't say what to do if found or not! nothing else was helpful. Then, I found this http://www.opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/Endian.h
silent:~/usr/include/machine
$ ls
_limits.h _types.h fasttrap_isa.h profile.h vmparam.h
_mcontext.h byte_order.h limits.h signal.h
_param.h `endian.h` param.h types.h
As you can the file I am getting the error for is already existed! Any help would be appreciated. Thank you.
PS: I am newbie, I don't know what is this link above talking about :(!
On OSX and iOS, you can include endian.h this way:
#include <machine/endian.h>
But note that this will fail on Android or Linux because they expect #include <endian.h>.
You can also include sys/types.h, which will include the right endian.h both on iOS/OSX and Android/Linux:
#include <sys/types.h>
You have to tell the c compiler where it can find this file:
export CFLAGS="$CFLAGS -I~/usr/include/machine"
then run make.
Alternatively you can edit the file Makefile to add the -I~/usr/include/machine part where necessary.

error while building Glibc-2.11.1 for Linux From Scratch

I am trying to configure glibc-2.11.1 using gcc-4.6.1 for kernel 3.16. I am following steps given at http://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html when i am doing make after compiling some file it is giving
make -r PARALLELMFLAGS="" CVSOPTS="" -C ../glibc-2.11.1 objdir=`pwd` all
make[1]: Entering directory `/home/amar/Desktop/glib1/glibc-2.11.1'
make subdir=csu -C csu ..=../ subdir_lib
make[2]: Entering directory `/home/amar/Desktop/glib1/glibc-2.11.1/csu'
gcc /home/amar/Desktop/glib1/gnu/csu/crti.S -c -I../include -I/home/amar/Desktop/glib1/gnu/csu -I/home/amar/Desktop/glib1/gnu -I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686 -I../sysdeps/unix/sysv/linux/i386/i686 -I../nptl/sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../nptl/sysdeps/i386/i686 -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../nptl/sysdeps/i386 -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I.. -I../libio -I. -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DHAVE_INITFINI -DASSEMBLER -I/home/amar/Desktop/glib1/gnu/csu/. -DGAS_SYNTAX -g -Wa,--noexecstack -g0 -o /home/amar/Desktop/glib1/gnu/csu/crti.o
/tmp/ccEB9vct.s: Assembler messages:
/tmp/ccEB9vct.s: Error: open CFI at the end of file; missing .cfi_endproc directive
/tmp/ccEB9vct.s: Error: open CFI at the end of file; missing .cfi_endproc directive
make[2]: *** [/home/amar/Desktop/glib1/gnu/csu/crti.o] Error 1
make[2]: Leaving directory `/home/amar/Desktop/glib1/glibc-2.11.1/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/home/amar/Desktop/glib1/glibc-2.11.1'
make: *** [all] Error 2
Why is it so ? How I can rectify this error? Please help me. Thanks in advance
Why is it so ?
The file crti.S that is failing to build is generated by compiling csu/initfini.c, and then splitting the resulting initfini.s on "magic markers".
Unfortunately, this splitting is extremely dependent on the version of gcc that is used to generate initfini.s, and doesn't always work.
This entire mechanism has been eliminated in Feb 2012.
Your options are:
build a newer version of glibc (current is 2.19), or
build using older version of GCC (Google search shows many instances of gcc-4.6 causing this problem).

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.

Resources