Open mgerth opened 5 years ago
Looking at the build scripts for node-ffi
, when building its deps/libffi
it has this for include_dirs
:
https://github.com/node-ffi/node-ffi/blob/169773db0d56c4c99225b307b3dc86a46f3af34d/deps/libffi/libffi.gyp#L106-L110
'include_dirs': [
'include',
# platform and arch-specific headers
'config/<(OS)/<(target_arch)'
],
Looking at https://github.com/node-ffi/node-ffi/tree/master/deps/libffi/config there is no generated configuration for OS/390
. Steps to generate a configuration are listed in https://github.com/node-ffi/node-ffi/blob/master/deps/libffi/config/README.
@richardlau: Thanks for the quick answer ...
Unfortunately the configure fails:
bash-4.3$ ./configure --enable-static --disable-shared --disable-builddir --with-pic
checking build system type... i370-ibm-openedition
checking host system type... i370-ibm-openedition
checking target system type... i370-ibm-openedition
checking for gsed... sed
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... no
checking for cc... 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... unsupported
checking for style of include used by make... GNU
checking dependency style of cc... none
checking dependency style of cc... none
checking whether cc understands -c and -o together... no
checking how to print strings... printf
checking for a sed that does not truncate output... /DA3F/u/ada/mm/p/python-2017-04-12-py27/python27/bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for non-GNU ld... /bin/ld
checking if the linker (/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /bin/nm -p
checking the name lister (/bin/nm -p) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i370-ibm-openedition file names to i370-ibm-openedition format... func_convert_file_noop
checking how to convert i370-ibm-openedition file names to toolchain format... func_convert_file_noop
checking for /bin/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... unknown
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... no
checking command to parse /bin/nm -p output from /DA3F/u/ada/ger/code/node-ffi/deps/libffi/compile cc object... failed
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... /DA3F/u/ada/ger/code/node-ffi/deps/libffi/compile cc -E
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 /DA3F/u/ada/ger/code/node-ffi/deps/libffi/compile cc option to produce PIC... -DPIC
checking if /DA3F/u/ada/ger/code/node-ffi/deps/libffi/compile cc PIC flag -DPIC works... yes
checking if /DA3F/u/ada/ger/code/node-ffi/deps/libffi/compile cc static flag works... yes
checking if /DA3F/u/ada/ger/code/node-ffi/deps/libffi/compile cc supports -c -o file.o... yes
checking if /DA3F/u/ada/ger/code/node-ffi/deps/libffi/compile cc supports -c -o file.o... (cached) yes
checking whether the /DA3F/u/ada/ger/code/node-ffi/deps/libffi/compile cc linker (/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 for C compiler vendor... ibm
checking whether C compiler accepts -qarch=auto -qtune=auto... no
******************************************************
* You seem to have the IBM C compiler. It is *
* recommended for best performance that you use: *
* *
* CFLAGS=-O3 -qarch=xxx -qtune=xxx -qansialias -w *
* ^^^ ^^^ *
* where xxx is pwr2, pwr3, 604, or whatever kind of *
* CPU you have. (Set the CFLAGS environment var. *
* and re-run configure.) For more info, man cc. *
******************************************************
checking whether C compiler accepts -O3 -qansialias -w... no
********************************************************`
* WARNING: The guessed CFLAGS don't seem to work with *
* your compiler. *
* Use ./configure CFLAGS=... to specify your own flags *
********************************************************
checking CFLAGS for maximum warnings... +w1
checking whether to enable maintainer-specific portions of Makefiles... no
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for mmap... no
checking for sys/mman.h... (cached) yes
checking for mmap... (cached) no
configure: error: "libffi has not been ported to i370-ibm-openedition."
configure: error: "libffi has not been ported to i370-ibm-openedition."
Looks like this is from here https://github.com/node-ffi/node-ffi/blob/d9b843c03b35b99f205d001ebcbedd1b6c63b3d0/deps/libffi/configure.ac#L212 which has a case
statement a few lines above it.
I've a project where I need to call a shared library from Node.js. To achieve this I used "Node.js Foreign Function Interface" (https://github.com/node-ffi/node-ffi)... unfortunately the install stops with an error. I stripped down the package.json file to make it as simple as possible:
Here is the output of the "npm i" command:
My environment is the following:
I assume that it is a problem of the node-ffi package, but perhaps has someone run into a similar problem. Any suggestions to solve the problem are appreciated ...