Skip to content

link error when build jerry.exe on MSYS2 MinGW64 #5107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kuerka opened this issue Nov 10, 2023 · 1 comment · Fixed by #4856
Closed

link error when build jerry.exe on MSYS2 MinGW64 #5107

kuerka opened this issue Nov 10, 2023 · 1 comment · Fixed by #4856
Labels
feature request Requested feature windows Windows specific

Comments

@kuerka
Copy link

kuerka commented Nov 10, 2023

I build Jerryscript on MSYS2, it occurs error at this step:

[235/235] Linking C executable bin\jerry.exe
FAILED: bin/jerry.exe
cmd.exe /C "cd . && C:\Users\luoluo\scoop\apps\msys2\2023-10-26\mingw64\bin\cc.exe -std=c99 -pedantic -Wall -Werror=all -Wextra -Werror=extra -Wformat-nonliteral -Werror=format-nonliteral -Winit-self -Werror=init-self -Wsign-conversion -Werror=sign-conversion -Wformat-security -Werror=format-security -Wmissing-declarations -Werror=missing-declarations -Wshadow -Werror=shadow -Wstrict-prototypes -Werror=strict-prototypes -Wundef -Werror=undef -Wold-style-definition -Werror=old-style-definition -Wno-stack-protector -Wno-attributes -Werror -Wlogical-op -Werror=logical-op -Wno-implicit-fallthrough -Os -DNDEBUG -s jerry-main/CMakeFiles/jerry.dir/main-desktop.c.obj jerry-main/CMakeFiles/jerry.dir/arguments/options.c.obj jerry-main/CMakeFiles/jerry.dir/arguments/cli.c.obj -o bin\jerry.exe -Wl,--out-implib,lib\libjerry.dll.a -Wl,--major-image-version,0,--minor-image-version,0  lib/libjerry-core.a  lib/libjerry-ext.a  lib/libjerry-port.a  lib/libjerry-core.a  -lm  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-core.a(jerryscript.c.obj):jerryscript.c:(.text+0x30aa): undefined reference to `jerry_port_log'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-core.a(jerryscript.c.obj):jerryscript.c:(.text+0x31f9): undefined reference to `jerry_port_log'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-core.a(jerryscript.c.obj):jerryscript.c:(.text+0x332d): undefined reference to `jerry_port_log'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-core.a(jerryscript.c.obj):jerryscript.c:(.text+0x3353): undefined reference to `jerry_port_log'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-core.a(jrt-fatals.c.obj):jrt-fatals.c:(.text+0x5): undefined reference to `jerry_port_fatal'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-core.a(jerry-module.c.obj):jerry-module.c:(.text+0x1e3): undefined reference to `jerry_port_source_read'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-core.a(jerry-module.c.obj):jerry-module.c:(.text+0x24b): undefined reference to `jerry_port_source_free'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(handlers.c.obj):handlers.c:(.text+0xa0): undefined reference to `jerry_port_fatal'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(print.c.obj):print.c:(.text+0x60): undefined reference to `jerry_port_print_buffer'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(print.c.obj):print.c:(.text+0xb5): undefined reference to `jerry_port_print_buffer'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(print.c.obj):print.c:(.text+0xe0): undefined reference to `jerry_port_print_buffer'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(print.c.obj):print.c:(.text+0x2c4): undefined reference to `jerry_port_source_read'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(print.c.obj):print.c:(.text+0x326): undefined reference to `jerry_port_source_free'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(print.c.obj):print.c:(.text+0x7b): undefined reference to `jerry_port_print_byte'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(print.c.obj):print.c:(.text+0x80): undefined reference to `jerry_port_print_buffer'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(print.c.obj):print.c:(.text+0x9e): undefined reference to `jerry_port_print_buffer'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(repl.c.obj):repl.c:(.text+0x3d): undefined reference to `jerry_port_line_read'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(repl.c.obj):repl.c:(.text+0x7f): undefined reference to `jerry_port_line_free'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(repl.c.obj):repl.c:(.text+0xac): undefined reference to `jerry_port_line_free'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(sources.c.obj):sources.c:(.text+0xf): undefined reference to `jerry_port_source_read'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(sources.c.obj):sources.c:(.text+0x4f): undefined reference to `jerry_port_source_free'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(sources.c.obj):sources.c:(.text+0xac): undefined reference to `jerry_port_source_free'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(sources.c.obj):sources.c:(.text+0x1ac): undefined reference to `jerry_port_source_read'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(sources.c.obj):sources.c:(.text+0x202): undefined reference to `jerry_port_source_free'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(sources.c.obj):sources.c:(.text+0x22c): undefined reference to `jerry_port_line_read'
C:/Users/luoluo/scoop/apps/msys2/2023-10-26/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/libjerry-ext.a(sources.c.obj):sources.c:(.text+0x264): undefined reference to `jerry_port_line_free'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

And the gcc version is 13.2.0, cmake version is 3.27.7. These toolchain all installed by pacman.

@ossy-szeged ossy-szeged added feature request Requested feature windows Windows specific labels Nov 21, 2024
@ossy-szeged
Copy link
Contributor

This configuration is not officially supported. If somebody is interested to fix it, PR is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requested feature windows Windows specific
Projects
None yet
2 participants