automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MinGW and "warning: implicit declaration of function _spawnv"


From: Jeffrey Walton
Subject: MinGW and "warning: implicit declaration of function _spawnv"
Date: Tue, 7 Nov 2017 18:10:18 -0500

I'm testing on MinGW (). I'm surprised how easily the library built
for MinGW under Autotools. Hat's off for the good job.

I'm down to one error from what appears to be an Automake source file
(see below). I'm not a MinGW expert and searching is not returning
useful results. I test the platform to get in front of problems users
may experience.

I'm not sure how to workaround the issue. Do I add a uniform name
target for lt-cryptest.c and give it special flags? Maybe something
like:

    ltcryptest_CXXFLAGS = $(AM_CXXFLAGS) <some other flag>

Or maybe something else?

Thanks in advance.

Jeff

******************************

$ make
make  all-am
make[1]: Entering directory '/home/Jeff/cryptopp'
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -pthread
-fdata-sections -ffunction-sections -pipe
-DCRYPTOPP_DATA_DIR='"@pkgdatadir@/cryptopp/"' -g -O2 -pthread
-Wl,--gc-sections  -o cryptest.exe cryptest-test.o cryptest-bench1.o
cryptest-bench2.o cryptest-validat0.o cryptest-validat1.o
cryptest-validat2.o cryptest-validat3.o cryptest-datatest.o
cryptest-regtest1.o cryptest-regtest2.o cryptest-regtest3.o
cryptest-dlltest.o cryptest-fipsalgt.o cryptest-adhoc.o libcryptopp.la
libtool: link: g++ -pthread -fdata-sections -ffunction-sections -pipe
-DCRYPTOPP_DATA_DIR=\"@pkgdatadir@/cryptopp/\" -g -O2 -pthread
-Wl,--gc-sections -o .libs/cryptest.exe cryptest-test.o
cryptest-bench1.o cryptest-bench2.o cryptest-validat0.o
cryptest-validat1.o cryptest-validat2.o cryptest-validat3.o
cryptest-datatest.o cryptest-regtest1.o cryptest-regtest2.o
cryptest-regtest3.o cryptest-dlltest.o cryptest-fipsalgt.o
cryptest-adhoc.o  ./.libs/libcryptopp.a -pthread
./.libs/lt-cryptest.c: In function 'main':
./.libs/lt-cryptest.c:319:16: warning: implicit declaration of
function '_spawn ' [-Wimplicit-function-declaration]
   rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
                ^~~~~~~
/tmp/ccuZVZU6.o: In function `main':
/home/Jeff/cryptopp/./.libs/lt-cryptest.c:319: undefined reference to `_spawnv'
/home/Jeff/cryptopp/./.libs/lt-cryptest.c:319:(.text.startup+0x4b4):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`_spawnv'
collect2: error: ld returned 1 exit status
strip: './cryptest.exe': No such file
./libtool: line 11083: ./cryptest.exe: No such file or directory
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -pthread
-fdata-sections -ffunction-sections -pipe -g -O2 -pthread
-Wl,--gc-sections  -o cryptestcwd.exe cryptestcwd-test.o
cryptestcwd-bench1.o cryptestcwd-bench2.o cryptestcwd-validat0.o
cryptestcwd-validat1.o cryptestcwd-validat2.o cryptestcwd-validat3.o
cryptestcwd-datatest.o cryptestcwd-regtest1.o cryptestcwd-regtest2.o
cryptestcwd-regtest3.o cryptestcwd-dlltest.o cryptestcwd-fipsalgt.o
cryptestcwd-adhoc.o libcryptopp.la
libtool: link: g++ -pthread -fdata-sections -ffunction-sections -pipe
-g -O2 -pthread -Wl,--gc-sections -o .libs/cryptestcwd.exe
cryptestcwd-test.o cryptestcwd-bench1.o cryptestcwd-bench2.o
cryptestcwd-validat0.o cryptestcwd-validat1.o cryptestcwd-validat2.o
cryptestcwd-validat3.o cryptestcwd-datatest.o cryptestcwd-regtest1.o
cryptestcwd-regtest2.o cryptestcwd-regtest3.o cryptestcwd-dlltest.o
cryptestcwd-fipsalgt.o cryptestcwd-adhoc.o  ./.libs/libcryptopp.a
-pthread
./.libs/lt-cryptestcwd.c: In function 'main':
./.libs/lt-cryptestcwd.c:319:16: warning: implicit declaration of
function '_spawnv' [-Wimplicit-function-declaration]
   rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
                ^~~~~~~
/tmp/ccENXptt.o: In function `main':
/home/Jeff/cryptopp/./.libs/lt-cryptestcwd.c:319: undefined reference
to `_spawnv'
/home/Jeff/cryptopp/./.libs/lt-cryptestcwd.c:319:(.text.startup+0x4b4):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol
`_spawnv'
collect2: error: ld returned 1 exit status
strip: './cryptestcwd.exe': No such file
./libtool: line 11083: ./cryptestcwd.exe: No such file or directory
make[1]: Leaving directory '/home/Jeff/cryptopp'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]