gawk error when compiling libgpg-error in crossdev armv7a environment - gentoo

I have gentoo ~amd64 installed
and I'm trying to create a crossdev environment for armv7a-hardfloat-linux-gnueabi.
my CFLAGS are `CCFLAGS="-O2 -pipe -fomit-frame-pointer".
when I try to compile the base system, it tries to compile libgpg-error and fails with:
gawk: fatal: cannot use gawk builtin `namespace' as variable
how do I resolve this to continue and build my crossdev environment ?
I tried downgrading gawk from 5 to 4 but the results are the same.
thanks

Same problem on my side:
"namespace" name is not acceptable by gawk-5.0
try:
sed -i \
-e "s/namespace/varerrno/g" \
src/{Makefile.am,mkstrtable.awk}
Before doing ./autogen.sh or/and ./configure
Hoping that help.

Could it be a typo?
Change "libpgp-error" to "libgpg-error".
Even one of the blue buttons has label "libgpg-error"

Related

How to Instruct mingw64-gcc to use Specific mingw-w64-headers/crt

I have compiled mingw-w64-headers and mingw-w64-crt as described here.
My issue is how to get gcc to use them.
I have tried the following to no avail:
SET mingw_dir=C:\msys64\mingw-w64
gcc -g -L %mingw_dir%\lib^
-I %mingw_dir%\include^
-Wl,--rpath=%mingw_dir%\lib^
test.c -o test
It fails to compile giving:
../lib/crt2.o: in function 'pre_c_init':
crt/crtexe.c:145: undefined reference to '__p__commode'
This seems to be an issue with ld, however I'm not sure how to solve it.
Seems that simply setting an environment variable LIBRARY_PATH=C:\msys64\mingw-w64\lib;%LIBRARY_PATH% solves the issue.
With this set, the command line invocation reduces to this:
gcc -g test.c -o test
Although this will use the headers installed by pacman -S $MINGW_PACKAGE_PREFIX-toolchain, this simply means I just have to compile mingw-w64-crt to get debug information.

CoqIDE Make on Windows

I have GnuWin32 Make and GnuWin32 Coreutils, installed and on my PATH. This works:
coq_makefile -f _CoqProject -o Makefile.coq
make -f Makefile.coq Frap.vo
But if I open Frap.v in CoqIDE, and do Compile > Make, the only output I see is this:
Compilation output:
Is this expected? How can I get Coq to build this?

Compiling OpenSSH on 64-bit machine with debugging symbols

I am trying to compile openssh with debugging symbols, but it is not happening and i have no idea why.
wget "https://ftp.nluug.nl/security/OpenSSH/openssh-7.2p2.tar.gz"
tar xfz openssh-7.2p2.tar.gz
cd openssh-7.2p2
autoconf
./configure --with-audit=debug
make
sudo make install
objdump --syms bin/ssh
bin/ssh: file format elf64-x86-64
SYMBOL TABLE: no symbols
any thoughts why the debugging symbols are not there? please note that when I execute this command as below:
objdump --syms bin/ssh.o
I can see that symbols have been added to the object file, but not in the final executable file when the linker finish up the file.
Thanks in advance.
If you look at what make install does, you'll see
/usr/bin/install -c -m 0755 -s ssh /usr/local/bin/ssh
The -s option causes debug symbols to be stripped, just like the strip command.
Maybe there's a way to disable that?
$ ./configure --help |grep strip
--disable-strip Disable calling strip(1) on install
Oh, there we go.

GCC error when installing ncurses on OS X 10.8

I'm trying to install ncurses 5.9 on OS X 10.8 with GCC 4.9 installed. No errors or warnings show up when I run ./configure in the ncurses directory, but when I run make, I get gcc: error: unrecognized command line option ‘-no-cpp-precomp’. Upon googling the issue (and trying it out), I found that --no-cpp-precomp (with two dashes, i.e in long flag form) is a valid command.
I'm not sure what was prompting GCC to run the invalid command – whether it was make, or if it was a command specified in ncurses itself.
Is there any way to fix this? If so, how?
EDIT: I tried changing the reference in the ./configure file from -no-cpp-precomp to --no-cpp-precomp manually, using a text editor, and was met with this, despite GCC seemingly accepting the --no-cpp-precomp option. After that, I tried running autoreconf, and got this:
configure:6558: error: possibly undefined macro: AC_DIVERT_HELP
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /opt/local/bin/autoconf failed with exit status: 1
After running it with the m4_pattern_allow option:
autoreconf: 'configure.ac' or 'configure.in' is required
After running ./configure && make anyway:
cd man && make DESTDIR="" all
sh ./MKterminfo.sh ./terminfo.head ./../include/Caps ./terminfo.tail >terminfo.5
cd include && make DESTDIR="" all
cat curses.head >curses.h
AWK=gawk sh ./MKkey_defs.sh ./Caps >>curses.h
sh -c 'if test "chtype" = "cchar_t" ; then cat ./curses.wide >>curses.h ; fi'
cat ./curses.tail >>curses.h
gawk -f MKterm.h.awk ./Caps > term.h
sh ./edit_cfg.sh ../include/ncurses_cfg.h term.h
** edit: HAVE_TCGETATTR 1
** edit: HAVE_TERMIOS_H 1
** edit: HAVE_TERMIO_H 0
** edit: BROKEN_LINKER 0
cd ncurses && make DESTDIR="" all
gcc -o make_hash -DHAVE_CONFIG_H -I../ncurses -I. -I./../include -I../include -DUSE_BUILD_CC -DHAVE_CONFIG_H -I../ncurses -I. -D_DARWIN_C_SOURCE -DNDEBUG -I. -I../include -I/usr/local/include/ncurses -O2 --param max-inline-insns-single=1200 --no-cpp-precomp ./tinfo/make_hash.c -Wl,-search_paths_first
gcc: error: unrecognized command line option ‘--no-cpp-precomp’
make[1]: *** [make_hash] Error 1
make: *** [all] Error 2
It looks like this has been fixed in the latest patches to ncurses 5.9
The 5.9 source can be found here: ftp://invisible-island.net/ncurses/ncurses-5.9.tar.gz
The latest patches are here: ftp://invisible-island.net/ncurses/5.9/ but the latest rollup patch appears to have the fix: ftp://invisible-island.net/ncurses/5.9/patch-5.9-20130504.sh.gz
To apply the patch, get the 2 files above then:
$ tar xvf ncurses-5.9.tar.gz
$ cd ncurses-5.9
$ gzip -dc ../patch-5.9-20130504.sh.gz | sh
--no-cpp-precomp is an obsolete Apple GCC option it should generate a warnning not an error but if -Werror flag is passed to the compiler it will fail on warnings, either way, you will have to remove it manually from the build scripts and then run autoreconf or you could just remove it from the configure script directly.
I realize this is very old now, but since I'm running into the same issue (need to build on Mac Yosemite 10.10 with GCC 4.9), maybe it'll help someone else too. It looks like the configure script is detecting that it's a Mac and assuming clang is used, even though the 'gcc' from the PATH is GNU. Seems they fixed the detection logic in newer versions. I've found the same issue in Boost 1.37 and it was fixed (somewhere before) Boost 1.55.

How to compile GNU sed without dll?

I compiled the GNU sed with MinGW+MSYS:
./configure
make && make install
and it worked.
But what has come to trouble me is that the sed.exe can not run without libintl-8.dll libiconv-2.dll.
How to solve this problem?
./configure LDFLAGS=-static
make
ref

Resources