Open XVilka opened 3 years ago
These linking errors seems related to this: https://github.com/msys2/MINGW-packages/issues/6986
Just retested and relocation truncated to fit: R_X86_64_PC32 against undefined symbol
are gone now with MSYS2 updated binutils, only remaining error are undefined symbols:
| ^~~~~~~
[204/1644] Linking target librz/socket/msys-rz_socket-0.3.0-git.dll
FAILED: librz/socket/msys-rz_socket-0.3.0-git.dll
cc -o librz/socket/msys-rz_socket-0.3.0-git.dll librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket.c.o librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket_http.c.o librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket_http_server.c.o librz/so
cket/msys-rz_socket-0.3.0-git.dll.p/socket_serial.c.o librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket_proc.c.o librz/socket/msys-rz_socket-0.3.0-git.dll.p/rzpipe.c.o librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket_rap_client.c.o libr
z/socket/msys-rz_socket-0.3.0-git.dll.p/socket_rap_server.c.o librz/socket/msys-rz_socket-0.3.0-git.dll.p/run.c.o -Wl,--as-needed -Wl,--allow-shlib-undefined -shared -Wl,--start-group -Wl,--out-implib=librz/socket/librz_socket.dll.a librz/
util/librz_util.dll.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -Wl,--end-group
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket.c.o: in function `rz_socket_connect':
/d/rizin/build/../librz/socket/socket.c:275: undefined reference to `rz_sys_signal'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket.c:275: undefined reference to `rz_sys_signal'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket.c:323: undefined reference to `rz_sys_perror_str'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket.c.o: in function `rz_socket_port_by_name':
/d/rizin/build/../librz/socket/socket.c:471: undefined reference to `rz_num_get'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket.c.o: in function `rz_socket_connect':
/d/rizin/build/../librz/socket/socket.c:258: undefined reference to `rz_assert_log'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket.c.o: in function `rz_socket_spawn':
/d/rizin/build/../librz/socket/socket.c:210: undefined reference to `rz_num_rand'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket.c:211: undefined reference to `rz_sys_fork'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket.c:213: undefined reference to `rz_str_replace'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket.c:214: undefined reference to `rz_sys_cmdf'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket.c:233: undefined reference to `rz_sys_sleep'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket.c:234: undefined reference to `rz_sys_usleep'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket.c:244: undefined reference to `rz_sys_sleep'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket.c:245: undefined reference to `rz_sys_usleep'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket.c.o: in function `rz_socket_port_by_name':
/d/rizin/build/../librz/socket/socket.c:471: undefined reference to `rz_num_get'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket.c:471: undefined reference to `rz_num_get'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket.c.o: in function `rz_socket_listen':
/d/rizin/build/../librz/socket/socket.c:548: undefined reference to `rz_sys_signal'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket.c.o: in function `__listen_unix':
/d/rizin/build/../librz/socket/socket.c:163: undefined reference to `rz_sys_signal'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket.c.o: in function `rz_socket_listen':
/d/rizin/build/../librz/socket/socket.c:539: undefined reference to `rz_sys_perror_str'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket.c:552: undefined reference to `rz_sys_perror_str'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket.c.o: in function `rz_socket_accept':
/d/rizin/build/../librz/socket/socket.c:597: undefined reference to `rz_sys_perror_str'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket.c.o: in function `rz_socket_write':
/d/rizin/build/../librz/socket/socket.c:736: undefined reference to `rz_sys_signal'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket_http.c.o: in function `socket_http_answer':
/d/rizin/build/../librz/socket/socket_http.c:39: undefined reference to `rz_buf_new_with_bytes'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket_http.c:49: undefined reference to `rz_buf_read_at'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket_http.c:51: undefined reference to `rz_str_casestr'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket_http.c:52: undefined reference to `rz_str_casestr'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket_http.c:73: undefined reference to `rz_str_casestr'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket_http.c:83: undefined reference to `rz_str_ndup'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket_http.c:84: undefined reference to `rz_str_trim'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket_http.c:127: undefined reference to `rz_buf_free'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket_http.c:127: undefined reference to `rz_buf_free'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket_http.c.o: in function `socket_slurp':
/d/rizin/build/../librz/socket/socket_http.c:27: undefined reference to `rz_buf_append_bytes'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket_http.c:24: undefined reference to `rz_buf_append_bytes'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket_http.c.o: in function `socket_http_answer':
/d/rizin/build/../librz/socket/socket_http.c:93: undefined reference to `rz_str_casestr'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket_http.c:35: undefined reference to `rz_assert_log'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket_http.c.o: in function `socket_http_get_recursive':
/d/rizin/build/../librz/socket/socket_http.c:198: undefined reference to `rz_sys_getenv'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket_http.c:225: undefined reference to `rz_str_startswith'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket_http.c:201: undefined reference to `rz_str_escape_sh'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket_http.c:202: undefined reference to `rz_str_newf'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket_http.c:203: undefined reference to `rz_sys_cmd_str'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket_http.c.o: in function `rz_socket_http_post':
/d/rizin/build/../librz/socket/socket_http.c:293: undefined reference to `rz_str_startswith'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket_http_server.c.o: in function `rz_socket_http_accept':
/d/rizin/build/../librz/socket/socket_http_server.c:88: undefined reference to `rz_base64_decode'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket_proc.c.o: in function `rz_socket_proc_open':
/d/rizin/build/../librz/socket/socket_proc.c:25: undefined reference to `rz_sys_pipe'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket_proc.c:30: undefined reference to `rz_sys_pipe'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/socket_proc.c:35: undefined reference to `rz_sys_fork'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/rzpipe.c.o: in function `rzpipe_close':
/d/rizin/build/../librz/socket/rzpipe.c:141: undefined reference to `rz_sys_pipe_close'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/rzpipe.c:137: undefined reference to `rz_sys_pipe_close'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/rzpipe.c:133: undefined reference to `rz_sys_pipe_close'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/rzpipe.c:129: undefined reference to `rz_sys_pipe_close'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/rzpipe.c.o: in function `rzpipe_open_dl':
/d/rizin/build/../librz/socket/rzpipe.c:218: undefined reference to `rz_lib_dl_open'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/rzpipe.c:219: undefined reference to `rz_lib_dl_sym'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/rzpipe.c:220: undefined reference to `rz_lib_dl_sym'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/rzpipe.c.o: in function `rzp_open_spawn':
/d/rizin/build/../librz/socket/rzpipe.c:172: undefined reference to `rz_sys_getenv'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/rzpipe.c:173: undefined reference to `rz_sys_getenv'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/rzpipe.c.o: in function `rzpipe_open':
/d/rizin/build/../librz/socket/rzpipe.c:248: undefined reference to `rz_sys_pipe'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/rzpipe.c:254: undefined reference to `rz_sys_pipe'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/rzpipe.c:260: undefined reference to `rz_sys_fork'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/rzpipe.c.o: in function `env':
/d/rizin/build/../librz/socket/rzpipe.c:30: undefined reference to `rz_str_newf'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/rzpipe.c:31: undefined reference to `rz_sys_setenv'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/rzpipe.c:30: undefined reference to `rz_str_newf'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/rzpipe.c:31: undefined reference to `rz_sys_setenv'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/rzpipe.c.o: in function `rzpipe_open':
/d/rizin/build/../librz/socket/rzpipe.c:282: undefined reference to `rz_sys_pipe_close'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/rzpipe.c:283: undefined reference to `rz_sys_pipe_close'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/rzpipe.c:293: undefined reference to `rz_sys_pipe_close'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/rzpipe.c:294: undefined reference to `rz_sys_pipe_close'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/rzpipe.c:303: undefined reference to `rz_sys_pipe_close'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/rzpipe.c:302: undefined reference to `rz_log'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/rzpipe.c.o: in function `rzpipe_cmd':
/d/rizin/build/../librz/socket/rzpipe.c:317: undefined reference to `rz_assert_log'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket_rap_server.c.o: in function `rz_socket_rap_server_new':
/d/rizin/build/../librz/socket/socket_rap_server.c:9: undefined reference to `rz_assert_log'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket_rap_server.c.o: in function `rz_socket_rap_server_create':
/d/rizin/build/../librz/socket/socket_rap_server.c:24: undefined reference to `rz_assert_log'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket_rap_server.c.o: in function `rz_socket_rap_server_listen':
/d/rizin/build/../librz/socket/socket_rap_server.c:44: undefined reference to `rz_assert_log'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket_rap_server.c.o: in function `rz_socket_rap_server_accept':
/d/rizin/build/../librz/socket/socket_rap_server.c:49: undefined reference to `rz_assert_log'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/socket_rap_server.c.o:/d/rizin/build/../librz/socket/socket_rap_server.c:54: more undefined references to `rz_assert_log' fol
low
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/run.c.o: in function `getstr':
/d/rizin/build/../librz/socket/run.c:243: undefined reference to `rz_str_unescape'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:214: undefined reference to `rz_sys_cmd_str'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:215: undefined reference to `rz_str_trim_tail'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:223: undefined reference to `rz_sys_cmd_str'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:224: undefined reference to `rz_str_trim_tail'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:234: undefined reference to `rz_hex_str2bin'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:180: undefined reference to `rz_str_unescape'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:229: undefined reference to `rz_sys_cmd_str'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:230: undefined reference to `rz_str_trim_tail'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/run.c.o: in function `redirect_socket_to_pty':
/d/rizin/build/../librz/socket/run.c:733: undefined reference to `rz_sys_fork'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/run.c.o: in function `handle_redirection':
/d/rizin/build/../librz/socket/run.c:396: undefined reference to `rz_sys_pipe'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:410: undefined reference to `rz_sys_pipe_close'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:411: undefined reference to `rz_sys_pipe_close'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/run.c.o: in function `rz_run_reset':
/d/rizin/build/../librz/socket/run.c:98: undefined reference to `rz_assert_log'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/run.c.o: in function `rz_run_parseline':
/d/rizin/build/../librz/socket/run.c:482: undefined reference to `rz_sys_getenv'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:612: undefined reference to `rz_sys_setenv'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:616: undefined reference to `rz_sys_clearenv'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:606: undefined reference to `rz_sys_setenv'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:576: undefined reference to `rz_sys_fopen'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:601: undefined reference to `rz_sys_setenv'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:564: undefined reference to `rz_signal_from_string'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:550: undefined reference to `rz_sys_setenv'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/run.c.o: in function `rz_run_parse':
/d/rizin/build/../librz/socket/run.c:109: undefined reference to `rz_str_replace_char'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:104: undefined reference to `rz_assert_log'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/run.c.o: in function `rz_run_parsefile':
/d/rizin/build/../librz/socket/run.c:464: undefined reference to `rz_file_slurp'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:463: undefined reference to `rz_assert_log'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/run.c.o: in function `dyn_init':
/d/rizin/build/../librz/socket/run.c:77: undefined reference to `rz_lib_dl_sym'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:80: undefined reference to `rz_lib_dl_sym'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/run.c.o: in function `rz_run_config_env':
/d/rizin/build/../librz/socket/run.c:881: undefined reference to `rz_sys_fork'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/run.c.o: in function `dyn_init':
/d/rizin/build/../librz/socket/run.c:74: undefined reference to `rz_lib_dl_sym'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/run.c.o: in function `rz_run_config_env':
/d/rizin/build/../librz/socket/run.c:989: undefined reference to `rz_sys_pipe'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1002: undefined reference to `rz_sys_pipe_close'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1013: undefined reference to `rz_str_rz_prefix'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1023: undefined reference to `rz_sys_setenv'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1036: undefined reference to `rz_sys_setenv'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1042: undefined reference to `rz_sys_fork'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:918: undefined reference to `rz_sys_sleep'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/run.c.o: in function `rz_run_start':
/d/rizin/build/../librz/socket/run.c:1127: undefined reference to `rz_sys_fork'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1136: undefined reference to `rz_file_dump'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1146: undefined reference to `rz_sys_fork'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1181: undefined reference to `rz_file_exists'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1213: undefined reference to `rz_file_dump'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1232: undefined reference to `rz_sys_fork'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1241: undefined reference to `rz_file_dump'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1263: undefined reference to `rz_lib_dl_open'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1268: undefined reference to `rz_lib_dl_sym'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1317: undefined reference to `rz_lib_dl_close'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1182: undefined reference to `rz_file_path'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1166: undefined reference to `rz_file_binsh'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/run.c.o: in function `rz_run_get_environ_profile':
/d/rizin/build/../librz/socket/run.c:1326: undefined reference to `rz_strbuf_new'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1332: undefined reference to `rz_str_escape_latin1'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: /d/rizin/build/../librz/socket/run.c:1334: undefined reference to `rz_strbuf_appendf'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/run.c.o: in function `getstr':
/d/rizin/build/../librz/socket/run.c:207: undefined reference to `rz_file_slurp'
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: librz/socket/msys-rz_socket-0.3.0-git.dll.p/run.c.o: in function `rz_run_get_environ_profile':
/d/rizin/build/../librz/socket/run.c:1341: undefined reference to `rz_strbuf_drain'
collect2: error: ld returned 1 exit status
[211/1644] Linking target librz/hash/msys-rz_hash-0.3.0-git.dll
FAILED: librz/hash/msys-rz_hash-0.3.0-git.dll
These are likely easily fixable ;)
Work environment
Expected behavior
Builds fine
Actual behavior
And a couple warnings:
Steps to reproduce the behavior
pacman -Syu
pacman -S gcc meson git
git clone https://github.com/rizinorg/rizin && cd rizin
meson build
ninja -C build
If you try the same on Cygwin it will show the same error. @ret2libc suggested to move the detection from the checking tons of
#ifdefs
to checking the presence of particular function/definition with Meson.