[foreign] libEndianTest fails on windows

Jorn Vernee jbvernee at xs4all.nl
Fri Mar 1 13:16:49 UTC 2019


Can confirm. The fix for that is to move the stdint.h include outside of 
the compiler switch block. Also, the return type of the declared 
functions needs to be `long long` or unint64_t to avoid lossy conversion 
warnings.

But! Even after that the linker is choking on a missing library 
dependency:

     libEndianTest.obj : error LNK2019: unresolved external symbol 
__imp_htonl referenced in function calc

To fix that would probably take some build system tinkering :/

Maybe we can re-write the test without the dependency?

Jorn

Maurizio Cimadamore schreef op 2019-03-01 12:19:
> Hi,
> The new endianness tests fails on windows platform:
> 
> === Output from failing command(s) repeated here ===
> jib > * For target
> support_test_jdk_jtreg_native_support_libEndianTest_libEndianTest.obj:
> jib > libEndianTest.c
> jib >
> t:/workspace/open/test/jdk/java/foreign/types/libEndianTest.c(43):
> error C2061: syntax error: identifier 'uint16_t'
> jib >
> t:/workspace/open/test/jdk/java/foreign/types/libEndianTest.c(44):
> error C2061: syntax error: identifier 'hl'
> jib >
> t:/workspace/open/test/jdk/java/foreign/types/libEndianTest.c(44):
> error C2059: syntax error: ';'
> jib >
> t:/workspace/open/test/jdk/java/foreign/types/libEndianTest.c(45):
> error C2061: syntax error: identifier 'hll'
> jib >
> t:/workspace/open/test/jdk/java/foreign/types/libEndianTest.c(45):
> error C2059: syntax error: ';'
> jib >
> t:/workspace/open/test/jdk/java/foreign/types/libEndianTest.c(46):
> error C2059: syntax error: '}'
> jib >
> t:/workspace/open/test/jdk/java/foreign/types/libEndianTest.c(47):
> error C2061: syntax error: identifier 'ns'
> jib >
> t:/workspace/open/test/jdk/java/foreign/types/libEndianTest.c(47):
> error C2059: syntax error: ';'
> jib >
> t:/workspace/open/test/jdk/java/foreign/types/libEndianTest.c(48):
> error C2061: syntax error: identifier 'nl'
> jib >
> t:/workspace/open/test/jdk/java/foreign/types/libEndianTest.c(48):
> error C2059: syntax error: ';'
> jib >
> t:/workspace/open/test/jdk/java/foreign/types/libEndianTest.c(49):
> error C2061: syntax error: identifier 'nll'
> jib >    ... (rest of output omitted)
> 
> I think it's an issue with stdint.h not being included...
> 
> Maurizio


More information about the panama-dev mailing list