You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wanting to build openjpeg for Nintendo Switch via devKitPro, but it fails with "undefined reference" errors,
Steps to reproduce the problem.
$ make
[ 2%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/thread.o
[ 4%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/bio.o
[ 6%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/cio.o
[ 8%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/dwt.o
[ 10%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/event.o
[ 12%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/ht_dec.o
[ 14%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/image.o
[ 17%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/invert.o
[ 19%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/j2k.o
[ 21%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/jp2.o
[ 23%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/mct.o
[ 25%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/mqc.o
[ 27%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/openjpeg.o
[ 29%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/opj_clock.o
[ 31%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/pi.o
[ 34%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/t1.o
[ 36%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/t2.o
[ 38%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/tcd.o
[ 40%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/tgt.o
[ 42%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/function_list.o
[ 44%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/opj_malloc.o
[ 46%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/sparse_array.o
[ 48%] Linking C static library ../../../bin/libopenjp2.a
[ 48%] Built target openjp2
[ 51%] Building C object src/bin/jp2/CMakeFiles/opj_decompress.dir/opj_decompress.o
[ 53%] Building C object src/bin/jp2/CMakeFiles/opj_decompress.dir/convert.o
In file included from D:/msys64/home/joao2/Downloads/openjpeg-2.5.0/src/bin/jp2/convert.c:43:
D:/msys64/home/joao2/Downloads/openjpeg-2.5.0/src/bin/jp2/convert.c: In function 'skip_white':
D:/msys64/home/joao2/Downloads/openjpeg-2.5.0/src/bin/jp2/convert.c:1501:25: warning: array subscript has type 'char' [-Wchar-subscripts]
1501 | if (isspace(*s)) {
| ^~
D:/msys64/home/joao2/Downloads/openjpeg-2.5.0/src/bin/jp2/convert.c: In function 'skip_int':
D:/msys64/home/joao2/Downloads/openjpeg-2.5.0/src/bin/jp2/convert.c:1525:22: warning: array subscript has type 'char' [-Wchar-subscripts]
1525 | if (!isdigit(*s)) {
| ^~
D:/msys64/home/joao2/Downloads/openjpeg-2.5.0/src/bin/jp2/convert.c: In function 'skip_idf':
D:/msys64/home/joao2/Downloads/openjpeg-2.5.0/src/bin/jp2/convert.c:1549:21: warning: array subscript has type 'char' [-Wchar-subscripts]
1549 | if (isalpha(*s) || *s == '_') {
| ^~
[ 55%] Building C object src/bin/jp2/CMakeFiles/opj_decompress.dir/convertbmp.o
[ 57%] Building C object src/bin/jp2/CMakeFiles/opj_decompress.dir/index.o
[ 59%] Building C object src/bin/jp2/CMakeFiles/opj_decompress.dir/__/common/color.o
[ 61%] Building C object src/bin/jp2/CMakeFiles/opj_decompress.dir/__/common/opj_getopt.o
[ 63%] Building C object src/bin/jp2/CMakeFiles/opj_decompress.dir/convertpng.o
[ 65%] Linking C executable ../../../bin/opj_decompress.elf
D:/msys64/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.2.0/../../../../aarch64-none-elf/bin/ld.exe: CMakeFiles/opj_decompress.dir/opj_decompress.o: in function `opj_clock':
D:/msys64/home/joao2/Downloads/openjpeg-2.5.0/src/bin/jp2/opj_decompress.c:1013:(.text.startup.main+0x224): undefined reference to `getrusage'
D:/msys64/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.2.0/../../../../aarch64-none-elf/bin/ld.exe: D:/msys64/home/joao2/Downloads/openjpeg-2.5.0/src/bin/jp2/opj_decompress.c:1013:(.text.startup.main+0x350): undefined reference to `getrusage'
D:/msys64/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/13.2.0/../../../../aarch64-none-elf/bin/ld.exe: ../../../bin/libopenjp2.a(thread.o): in function `opj_get_num_cpus':
D:/msys64/home/joao2/Downloads/openjpeg-2.5.0/src/lib/openjp2/thread.c:303:(.text.opj_get_num_cpus+0xc): undefined reference to `sysconf'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [src/bin/jp2/CMakeFiles/opj_decompress.dir/build.make:197: bin/opj_decompress.elf] Error 1
make[1]: *** [CMakeFiles/Makefile2:248: src/bin/jp2/CMakeFiles/opj_decompress.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
Expected behavior and actual behavior.
Wanting to build openjpeg for Nintendo Switch via devKitPro, but it fails with "undefined reference" errors,
Steps to reproduce the problem.
build-switch.zip
CMakeCache.txt
LICENSE.txt
Operating system
Windows 10 Home 64-bit, on MSYS2
openjpeg version
2.5.0
The text was updated successfully, but these errors were encountered: