RE: Problems compiling on HPE NonStop

2020-12-11 Thread Randall S. Becker
On December 11, 2020 4:20 AM, Torbjörn wrote:
> To: Randall S. Becker 
> Cc: gmp-bugs@gmplib.org
> Subject: Re: Problems compiling on HPE NonStop
> 
> OK, I see a pretty garbled output from the configure run (which incidentally
> seem to trigger some elementary limitations of the sed command).  I also
> see an error message, which I understand comes from a compiler which
> presumably is c99 compiant.
> 
> The error message makes little sense.  The function __gmpz_inp_str_nowhite
> is declared in the included file gmp-impl.h.  If it ends up not being 
> declared,
> that must be due to the fact that we never ported GMP to "nonstop",
> resulting in that gmp-impl.h does not detect that stdio.h was included.
> 
> You need to debug the sed problem and see if you can generalise the stdio.h
> detection mechanism of the include files.

The c99 compiler is pretty compliant, if I a bit strict.
The sed issue is pretty common on the platform but does not seem to block any 
other Open Source configure script. It looks like a ^M issue but I can't figure 
out how or why yet. We're on GNU sed 4.2.2, which I admit is 8 years old - 
outside of my control.

The issue seems to be in stdio.h, which exists. I think the critical missing 
line is as follows in gmp-h.in, which needs to be added.

  || defined (_STDIO) /* HPE NonStop */ \

With that change, compiles succeed, with a few warnings about the _dummy 
variable. make check all passes. I think we could consider GMP "ported" now.

Thanks,
Randall

___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: Problems compiling on HPE NonStop

2020-12-11 Thread Torbjörn Granlund
OK, I see a pretty garbled output from the configure run (which
incidentally seem to trigger some elementary limitations of the sed
command).  I also see an error message, which I understand comes from a
compiler which presumably is c99 compiant.

The error message makes little sense.  The function __gmpz_inp_str_nowhite
is declared in the included file gmp-impl.h.  If it ends up not being
declared, that must be due to the fact that we never ported GMP to
"nonstop", resulting in that gmp-impl.h does not detect that stdio.h was
included.

You need to debug the sed problem and see if you can generalise the
stdio.h detection mechanism of the include files.

-- 
Torbjörn
Please encrypt, key id 0xC8601622
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: Problems compiling on HPE NonStop

2020-12-11 Thread Marc Glisse

On Thu, 10 Dec 2020, Randall S. Becker wrote:


I'm having an issue compiling on HPE NonStop in OSS - this is a POSIX
compliant platform, The compiler is particularly sensitive to undefined
symbols and will not permit a return of an undefined function.



   return mpz_inp_str_nowhite (x, stream, base, c, nread);

  ^

"/home/git/gmp-6.2.1/mpz/inp_str.c", line 63: error(114): identifier

 "__gmpz_inp_str_nowhite" is undefined




configure: WARNING: gmp.h doesnt recognise , FILE prototypes will
be unavailable


This seems to be the issue. Could you check what macros stdio.h defines
on your system and compare to the list we have in gmp-h.in?

--
Marc Glisse
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Problems compiling on HPE NonStop

2020-12-11 Thread Randall S. Becker
Hi GMP,

 

I'm having an issue compiling on HPE NonStop in OSS - this is a POSIX
compliant platform, The compiler is particularly sensitive to undefined
symbols and will not permit a return of an undefined function.

 

return mpz_inp_str_nowhite (x, stream, base, c, nread);

   ^

"/home/git/gmp-6.2.1/mpz/inp_str.c", line 63: error(114): identifier

  "__gmpz_inp_str_nowhite" is undefined

 

This is on a c99 compiler - there is no gcc on the platform.

 

GMP Version 6.2.1 from tarball.

No configure options were used.

Configure output:

configure: loading site script /usr/local/etc/config.site

checking build system type... nse-tandem-nskJ06

checking host system type... nse-tandem-nskJ06

checking for a BSD-compatible install... /usr/coreutils/bin/ginstall -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /usr/coreutils/bin/mkdir -p

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking whether make supports nested variables... yes

checking whether to enable maintainer-specific portions of Makefiles... no

checking ABI=standard

checking compiler cc -O ... yes

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... no

checking whether cc accepts -g... yes

checking for cc option to accept ISO C89... none needed

checking whether cc understands -c and -o together... yes

checking for cc option to accept ISO C99... -c99

checking how to run the C preprocessor... cpp

checking build system compiler cc -c99... yes

checking for build system preprocessor... cc -c99 -E

checking for build system executable suffix...

checking whether build system compiler is ANSI... yes

checking for build system compiler math library... -lm

checking for grep that handles long lines and -e... /usr/coreutils/bin/grep

checking for egrep... /usr/coreutils/bin/grep -E

using ABI="standard"

  CC="cc -c99"

  CFLAGS="-O"

  CPPFLAGS=""

  MPN_PATH="  generic"

checking whether assembler supports --noexecstack option... no

checking for ar... ar

checking for BSD- or MS-compatible name lister (nm)... /usr/local/bin/nm

checking the name lister (/usr/local/bin/nm) interface... BSD nm

checking how to print strings... print -r

checking for a sed that does not truncate output... /usr/coreutils/bin/sed

checking for fgrep... /usr/coreutils/bin/grep -F

checking for non-GNU ld... /usr/local/bin/ld

checking if the linker (/usr/local/bin/ld) is GNU ld... no

checking whether ln -s works... yes

checking the maximum length of command line arguments... 23040

checking how to convert nse-tandem-nskJ06 file names to nse-tandem-nskJ06
format... func_convert_file_noop

checking how to convert nse-tandem-nskJ06 file names to toolchain format...
func_convert_file_noop

checking for /usr/local/bin/ld option to reload object files... -r

checking for objdump... objdump

checking how to recognize dependent libraries... unknown

checking for dlltool... dlltool

checking how to associate runtime and link libraries... print -r --

checking for archiver @FILE support... no

checking for strip... strip

checking for ranlib... ranlib

checking command to parse /usr/local/bin/nm output from cc -c99 object...
failed

checking for sysroot... no

checking for a working dd... /usr/coreutils/bin/dd

checking how to truncate binary pipes... /usr/coreutils/bin/dd bs=4096
count=1

checking for mt... no

checking if : is a manifest tool... no

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking for dlfcn.h... yes

checking for objdir... .libs

checking for cc -c99 option to produce PIC...  -DPIC

checking if cc -c99 PIC flag  -DPIC works... yes

checking if cc -c99 static flag  works... yes

checking if cc -c99 supports -c -o file.o... yes

checking if cc -c99 supports -c -o file.o... (cached) yes

checking whether the cc -c99 linker (/usr/local/bin/ld) supports shared
libraries... no

checking dynamic linker characteristics... no

checking how to hardcode library paths into programs... unsupported

checking whether stripping libraries is possible... no

checking if libtool supports shared libraries... no

checking whether to build shared libraries... no

checking whether to build static libraries... yes

checking how to run the C++ preprocessor... c++ -E

checking whether the c++ linker (/usr/local/bin/ld) supports shared
libraries... no

checking for c++ option to produce PIC...  -DPIC

checking if c++ PIC flag  -DPIC works... yes