Skip to content
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

Build failure: hashlink #368216

Closed
LordMZTE opened this issue Dec 25, 2024 · 3 comments · Fixed by #369800
Closed

Build failure: hashlink #368216

LordMZTE opened this issue Dec 25, 2024 · 3 comments · Fixed by #369800
Assignees
Labels
0.kind: build failure A package fails to build

Comments

@LordMZTE
Copy link
Contributor

Steps To Reproduce

Steps to reproduce the behavior:

  1. build hashlink

Build log

Build Log
warning: 'http://nix.mzte.de/mzte-int' does not appear to be a binary cache
Running phase: unpackPhase
unpacking source archive /nix/store/zbl7rm53py0v3y23nnjwggi9ilx4y485-source
source root is source
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
build flags: SHELL=/nix/store/5mh7kaj2fyv8mk4sfq1brwxgc02884wi-bash-5.2p37/bin/bash PREFIX=\$\(out\)
/nix/store/5mh7kaj2fyv8mk4sfq1brwxgc02884wi-bash-5.2p37/bin/bash: line 1: ./hl: No such file or directory
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_auto_possess.o -c include/pcre/pcre2_auto_possess.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_chartables.o -c include/pcre/pcre2_chartables.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_compile.o -c include/pcre/pcre2_compile.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
include/pcre/pcre2_compile.c: In function 'compile_regex':
include/pcre/pcre2_compile.c:8167:17: warning: storing the address of local variable 'capitem' in '*cb.open_caps' [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wdangling-pointer-Wdangling-pointer=8;;]
 8167 |   cb->open_caps = &capitem;
      |   ~~~~~~~~~~~~~~^~~~~~~~~~
include/pcre/pcre2_compile.c:8104:14: note: 'capitem' declared here
 8104 | open_capitem capitem;
      |              ^~~~~~~
include/pcre/pcre2_compile.c:8098:39: note: 'cb' declared here
 8098 |   branch_chain *bcptr, compile_block *cb, PCRE2_SIZE *lengthptr)
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_config.o -c include/pcre/pcre2_config.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_context.o -c include/pcre/pcre2_context.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_convert.o -c include/pcre/pcre2_convert.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_dfa_match.o -c include/pcre/pcre2_dfa_match.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_error.o -c include/pcre/pcre2_error.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_extuni.o -c include/pcre/pcre2_extuni.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_find_bracket.o -c include/pcre/pcre2_find_bracket.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_jit_compile.o -c include/pcre/pcre2_jit_compile.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_maketables.o -c include/pcre/pcre2_maketables.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_match_data.o -c include/pcre/pcre2_match_data.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_match.o -c include/pcre/pcre2_match.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_newline.o -c include/pcre/pcre2_newline.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_ord2utf.o -c include/pcre/pcre2_ord2utf.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_pattern_info.o -c include/pcre/pcre2_pattern_info.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_script_run.o -c include/pcre/pcre2_script_run.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_serialize.o -c include/pcre/pcre2_serialize.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_string_utils.o -c include/pcre/pcre2_string_utils.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_study.o -c include/pcre/pcre2_study.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_substitute.o -c include/pcre/pcre2_substitute.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_substring.o -c include/pcre/pcre2_substring.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_tables.o -c include/pcre/pcre2_tables.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_ucd.o -c include/pcre/pcre2_ucd.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_valid_utf.o -c include/pcre/pcre2_valid_utf.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/pcre/pcre2_xclass.o -c include/pcre/pcre2_xclass.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/gc.o -c src/gc.c
src/gc.c: In function 'gc_mark':
src/gc.c:828:82: warning: expression does not compute the number of elements in this array; element type is 'struct __jmp_buf_tag', not 'void *' [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wno-sizeof-array-div-Wsizeof-array-div8;;]
  828 |                 gc_mark_stack(&t->gc_regs,(void**)&t->gc_regs + (sizeof(jmp_buf) / sizeof(void*) - 1));
      |                                                                                  ^
src/gc.c:828:82: note: add parentheses around the second 'sizeof' to silence this warning
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/array.o -c src/std/array.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/buffer.o -c src/std/buffer.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/bytes.o -c src/std/bytes.c
src/std/bytes.c: In function 'hl_bytes_from_address':
src/std/bytes.c:259:17: warning: dereferencing type-punned pointer will break strict-aliasing rules [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wno-strict-aliasing-Wstrict-aliasing8;;]
  259 |         return *(vbyte**)&i64;
      |                 ^~~~~~~~~~~~~
src/std/bytes.c:259:16: warning: 'i64' is used uninitialized [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wno-uninitialized-Wuninitialized8;;]
  259 |         return *(vbyte**)&i64;
      |                ^~~~~~~~~~~~~~
src/std/bytes.c:256:39: note: 'i64' declared here
  256 |         struct { int low; int high; } i64;
      |                                       ^~~
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/cast.o -c src/std/cast.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/date.o -c src/std/date.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/error.o -c src/std/error.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/debug.o -c src/std/debug.c
src/std/debug.c: In function 'hl_debug_read_register':
src/std/debug.c:352:41: warning: pointer targets in passing argument 2 of 'hl_debug_read' differ in signedness [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wno-pointer-sign-Wpointer-sign8;;]
  352 |                 hl_debug_read(pid, addr + (-((int_val)r)-1), (vbyte*)&out, sizeof(void*));
      |                                    ~~~~~^~~~~~~~~~~~~~~~~~~
      |                                         |
      |                                         char *
src/std/debug.c:105:44: note: expected 'vbyte *' {aka 'unsigned char *'} but argument is of type 'char *'
  105 | HL_API bool hl_debug_read( int pid, vbyte *addr, vbyte *buffer, int size ) {
      |                                     ~~~~~~~^~~~
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/file.o -c src/std/file.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/fun.o -c src/std/fun.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/maps.o -c src/std/maps.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/math.o -c src/std/math.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/obj.o -c src/std/obj.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/random.o -c src/std/random.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/regexp.o -c src/std/regexp.c -I include/pcre -D HAVE_CONFIG_H -D PCRE2_CODE_UNIT_WIDTH=16
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/socket.o -c src/std/socket.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/string.o -c src/std/string.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/sys.o -c src/std/sys.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/types.o -c src/std/types.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/ucs2.o -c src/std/ucs2.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/thread.o -c src/std/thread.c
src/std/thread.c: In function 'hl_tls_set':
src/std/thread.c:507:33: warning: pointer 'store' used after 'free' [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wno-use-after-free-Wuse-after-free8;;]
  507 |                                 hl_remove_root(store);
      |                                 ^~~~~~~~~~~~~~~~~~~~~
src/std/thread.c:506:33: note: call to 'free' here
  506 |                                 free(store);
      |                                 ^~~~~~~~~~~
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/process.o -c src/std/process.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/std/track.o -c src/std/track.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o libhl.so -m64 -L/opt/libjpeg-turbo/lib64 -shared include/pcre/pcre2_auto_possess.o include/pcre/pcre2_chartables.o include/pcre/pcre2_compile.o include/pcre/pcre2_config.o include/pcre/pcre2_context.o include/pcre/pcre2_convert.o include/pcre/pcre2_dfa_match.o include/pcre/pcre2_error.o include/pcre/pcre2_extuni.o include/pcre/pcre2_find_bracket.o include/pcre/pcre2_jit_compile.o include/pcre/pcre2_maketables.o include/pcre/pcre2_match_data.o include/pcre/pcre2_match.o include/pcre/pcre2_newline.o include/pcre/pcre2_ord2utf.o include/pcre/pcre2_pattern_info.o include/pcre/pcre2_script_run.o include/pcre/pcre2_serialize.o include/pcre/pcre2_string_utils.o include/pcre/pcre2_study.o include/pcre/pcre2_substitute.o include/pcre/pcre2_substring.o include/pcre/pcre2_tables.o include/pcre/pcre2_ucd.o include/pcre/pcre2_valid_utf.o include/pcre/pcre2_xclass.o src/gc.o src/std/array.o src/std/buffer.o src/std/bytes.o src/std/cast.o src/std/date.o src/std/error.o src/std/debug.o src/std/file.o src/std/fun.o src/std/maps.o src/std/math.o src/std/obj.o src/std/random.o src/std/regexp.o src/std/socket.o src/std/string.o src/std/sys.o src/std/types.o src/std/ucs2.o src/std/thread.o src/std/process.o src/std/track.o -lpthread -lm
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/code.o -c src/code.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/jit.o -c src/jit.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/main.o -c src/main.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/module.o -c src/module.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/debugger.o -c src/debugger.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o src/profile.o -c src/profile.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o hl src/code.o src/jit.o src/main.o src/module.o src/debugger.o src/profile.o -L. -lhl -lm -Wl,-rpath,.:'$ORIGIN':/nix/store/vcbwpz43mj75y43dqhz7kv0lkdsyq03b-hashlink-1.14/lib -Wl,--export-dynamic -Wl,--no-undefined  -ldl
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o libs/fmt/fmt.o -c libs/fmt/fmt.c -I include/mikktspace -I include/minimp3
In file included from libs/fmt/fmt.c:16:
In function 'L3_decode_scalefactors',
    inlined from 'L3_decode' at include/minimp3/minimp3.h:1190:9,
    inlined from 'mp3dec_decode_frame' at include/minimp3/minimp3.h:1711:17:
include/minimp3/minimp3.h:683:42: warning: writing 1 byte into a region of size 0 [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wno-stringop-overflow-Wstringop-overflow=8;;]
  683 |             iscf[gr->n_long_sfb + i + 2] += gr->subblock_gain[2] << sh;
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/minimp3/minimp3.h: In function 'mp3dec_decode_frame':
include/minimp3/minimp3.h:648:26: note: at offset [41, 296] into destination object 'iscf' of size 40
  648 |     uint8_t scf_size[4], iscf[40];
      |                          ^~~~
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o libs/fmt/sha1.o -c libs/fmt/sha1.c -I include/mikktspace -I include/minimp3
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o include/mikktspace/mikktspace.o -c include/mikktspace/mikktspace.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o libs/fmt/mikkt.o -c libs/fmt/mikkt.c -I include/mikktspace -I include/minimp3
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o libs/fmt/dxt.o -c libs/fmt/dxt.c -I include/mikktspace -I include/minimp3
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -shared -o fmt.hdll libs/fmt/fmt.o libs/fmt/sha1.o include/mikktspace/mikktspace.o libs/fmt/mikkt.o libs/fmt/dxt.o -L/opt/libjpeg-turbo/lib64 -L. -lhl -lpng -lturbojpeg -lz -lvorbisfile
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o libs/sdl/sdl.o -c libs/sdl/sdl.c
libs/sdl/sdl.c: In function 'sdl_event_loop':
libs/sdl/sdl.c:341:60: warning: pointer targets in passing argument 1 of 'hl_copy_bytes' differ in signedness [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wno-pointer-sign-Wpointer-sign8;;]
  341 |                         vbyte* bytes = hl_copy_bytes(e.drop.file, (int)strlen(e.drop.file) + 1);
      |                                                      ~~~~~~^~~~~
      |                                                            |
      |                                                            char *
In file included from libs/sdl/sdl.c:3:
src/hl.h:599:43: note: expected 'const vbyte *' {aka 'const unsigned char *'} but argument is of type 'char *'
  599 | HL_API vbyte *hl_copy_bytes( const vbyte *byte, int size );
      |                              ~~~~~~~~~~~~~^~~~
libs/sdl/sdl.c: In function 'sdl_get_clipboard_text':
libs/sdl/sdl.c:852:38: warning: pointer targets in passing argument 1 of 'hl_copy_bytes' differ in signedness [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wno-pointer-sign-Wpointer-sign8;;]
  852 |         vbyte* bytes = hl_copy_bytes(chr, (int) strlen(chr) + 1);
      |                                      ^~~
      |                                      |
      |                                      char *
src/hl.h:599:43: note: expected 'const vbyte *' {aka 'const unsigned char *'} but argument is of type 'char *'
  599 | HL_API vbyte *hl_copy_bytes( const vbyte *byte, int size );
      |                              ~~~~~~~~~~~~~^~~~
libs/sdl/sdl.c:854:16: warning: pointer targets in returning 'vbyte *' {aka 'unsigned char *'} from a function with return type 'char *' differ in signedness [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wno-pointer-sign-Wpointer-sign8;;]
  854 |         return bytes;
      |                ^~~~~
libs/sdl/sdl.c: In function 'sdl_get_displays':
libs/sdl/sdl.c:880:82: warning: pointer targets in passing argument 1 of 'hl_copy_bytes' differ in signedness [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wno-pointer-sign-Wpointer-sign8;;]
  880 |                 hl_dyn_setp(obj, hl_hash_utf8("name"), &hlt_bytes, hl_copy_bytes(name, (int) strlen(name)+1));
      |                                                                                  ^~~~
      |                                                                                  |
      |                                                                                  const char *
src/hl.h:599:43: note: expected 'const vbyte *' {aka 'const unsigned char *'} but argument is of type 'const char *'
  599 | HL_API vbyte *hl_copy_bytes( const vbyte *byte, int size );
      |                              ~~~~~~~~~~~~~^~~~
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o libs/sdl/gl.o -c libs/sdl/gl.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -shared -o sdl.hdll libs/sdl/sdl.o libs/sdl/gl.o -L/opt/libjpeg-turbo/lib64 -L. -lhl -lSDL2 -lGL
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o libs/ssl/ssl.o -c libs/ssl/ssl.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -shared -o ssl.hdll libs/ssl/ssl.o -L/opt/libjpeg-turbo/lib64 -L. -lhl -lmbedtls -lmbedx509 -lmbedcrypto 
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o libs/openal/openal.o -c libs/openal/openal.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -shared -o openal.hdll libs/openal/openal.o -L/opt/libjpeg-turbo/lib64 -L. -lhl -lopenal
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o libs/ui/ui_stub.o -c libs/ui/ui_stub.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -shared -o ui.hdll libs/ui/ui_stub.o -L/opt/libjpeg-turbo/lib64 -L. -lhl
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o libs/uv/uv.o -c libs/uv/uv.c
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -shared -o uv.hdll libs/uv/uv.o -L/opt/libjpeg-turbo/lib64 -L. -lhl -luv
gcc -Wall -O3 -I src -std=c11 -D LIBHL_EXPORTS -m64 -fPIC -pthread -fno-omit-frame-pointer -o libs/mysql/socket.o -c libs/mysql/socket.c
libs/mysql/socket.c: In function 'phost_resolve':
libs/mysql/socket.c:130:17: error: implicit declaration of function 'gethostbyname_r'; did you mean 'gethostbyname'? [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaration8;;]
  130 |                 gethostbyname_r(host,&hbase,buf,1024,&h,&errcode);
      |                 ^~~~~~~~~~~~~~~
      |                 gethostbyname
make: *** [Makefile:286: libs/mysql/socket.o] Error 1

Additional context

Metadata

  • system: "x86_64-linux"
  • host os: Linux 6.12.5, NixOS, 25.05 (Warbler), 25.05.20241225.bb881a6
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.25.3
  • nixpkgs: /nix/store/x5bgci3098gb84dkc1v9cykpby9q7nl1-source

Notify maintainers

@iblech
@locallycompact
@l0go


Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

@LordMZTE LordMZTE added the 0.kind: build failure A package fails to build label Dec 25, 2024
@paparodeo
Copy link
Contributor

paparodeo commented Dec 26, 2024

fix-build.diff
diff --git a/pkgs/by-name/ha/hashlink/package.nix b/pkgs/by-name/ha/hashlink/package.nix
index 3e5e4809da86..42b45b119165 100644
--- a/pkgs/by-name/ha/hashlink/package.nix
+++ b/pkgs/by-name/ha/hashlink/package.nix
@@ -1,6 +1,8 @@
 { stdenv
 , lib
 , fetchFromGitHub
+, cmake
+, ninja
 , libGL
 , libGLU
 , libpng
@@ -12,7 +14,6 @@
 , pcre
 , SDL2
 , sqlite
-, getconf
 }:
 
 stdenv.mkDerivation rec {
@@ -26,7 +27,13 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-rXw56zoFpLMzz8U3RHWGBF0dUFCUTjXShUEhzp2Qc5g=";
   };
 
-  makeFlags = [ "PREFIX=$(out)" ];
+  # incompatible pointer type error: const char ** -> const void **
+  postPatch = ''
+    substituteInPlace libs/sqlite/sqlite.c \
+     --replace-warn \
+       "sqlite3_prepare16_v2(db->db, sql, -1, &r->r, &tl)" \
+       "sqlite3_prepare16_v2(db->db, sql, -1, &r->r, (const void**)&tl)"
+  '';
 
   buildInputs = [
     libGL
@@ -42,7 +49,7 @@ stdenv.mkDerivation rec {
     sqlite
   ];
 
-  nativeBuildInputs = [ getconf ];
+  nativeBuildInputs = [ cmake ninja ];
 
   # append default installPhase with library install for haxe
   postInstall = let
@@ -50,11 +57,7 @@ stdenv.mkDerivation rec {
   in ''
     mkdir -p "${haxelibPath}"
     echo -n "${version}" > "${haxelibPath}/../.current"
-    cp -r other/haxelib/* "${haxelibPath}"
-  '';
-
-  postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
-    install_name_tool -change libhl.dylib $out/lib/libhl.dylib $out/bin/hl
+    cp -r ../other/haxelib/* "${haxelibPath}"
   '';
 
   meta = with lib; {

@l0go
Copy link
Contributor

l0go commented Dec 26, 2024

Has the above patch been tested on MacOS? From a quick glance it could break some stuff...

@paparodeo
Copy link
Contributor

paparodeo commented Dec 26, 2024

Has the above patch been tested on MacOS? From a quick glance it could break some stuff...

I built it on x64 darwin and checked the shared lib with otool -- the current version leaves shared lib without the full path in the name, the diff I posted fixes it.

$ otool -D result/lib/libhl.1.14.0.dylib
result/lib/libhl.1.14.0.dylib:
/nix/store/pdf3mvslp84fdfvzzj7xdsd424z9apkr-hashlink-1.14/lib/libhl.1.dylib
$ ./result/bin/hl -h
HL/JIT 1.14.0 (c)2015-2023 Haxe Foundation
  Usage : hl [--debug <port>] [--debug-wait] <file>
$ otool -h
...
        -D print shared library id name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants