Skip to content

Zigmod fails to build on 0.14.0 for mips64-linux-musl #23965

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

Open
nektro opened this issue May 22, 2025 · 7 comments · May be fixed by #24021
Open

Zigmod fails to build on 0.14.0 for mips64-linux-musl #23965

nektro opened this issue May 22, 2025 · 7 comments · May be fixed by #24021
Assignees
Labels
arch-mips 32-bit and 64-bit MIPS bug Observed behavior contradicts documented or intended behavior zig cc Zig as a drop-in C compiler feature
Milestone

Comments

@nektro
Copy link
Contributor

nektro commented May 22, 2025

Zig Version

0.14.0

Steps to Reproduce and Observed Behavior

  1. git clone https://github.com/nektro/zigmod
  2. cd zigmod
  3. git checkout nektro-patch-64774
  4. zig build
  5. zig build -Dtarget=mips64-linux-musl
[meghan@nixos:~/dev/zigmod]$ zig build -Dtarget=mips64-linux-musl
install
└─ install zigmod
   └─ zig build-exe zigmod Debug mips64-linux-musl
      └─ zig build-lib dummy Debug mips64-linux-musl 16 errors
:1:1: error: ignoring '-fno-PIC' option as it cannot be used with implicit usage of -mabicalls and the N64 ABI
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/include/yaml.h:18:10: error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~~
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/reader.c:2:10: note: in file included from /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/reader.c:2:
#include "yaml_private.h"
         ^
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/yaml_private.h:5:10: note: in file included from /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/yaml_private.h:5:
#include <yaml.h>
         ^
:1:1: error: ignoring '-fno-PIC' option as it cannot be used with implicit usage of -mabicalls and the N64 ABI
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/include/yaml.h:18:10: error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~~
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/dumper.c:2:10: note: in file included from /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/dumper.c:2:
#include "yaml_private.h"
         ^
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/yaml_private.h:5:10: note: in file included from /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/yaml_private.h:5:
#include <yaml.h>
         ^
:1:1: error: ignoring '-fno-PIC' option as it cannot be used with implicit usage of -mabicalls and the N64 ABI
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/include/yaml.h:18:10: error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~~
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/writer.c:2:10: note: in file included from /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/writer.c:2:
#include "yaml_private.h"
         ^
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/yaml_private.h:5:10: note: in file included from /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/yaml_private.h:5:
#include <yaml.h>
         ^
:1:1: error: ignoring '-fno-PIC' option as it cannot be used with implicit usage of -mabicalls and the N64 ABI
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/include/yaml.h:18:10: error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~~
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/loader.c:2:10: note: in file included from /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/loader.c:2:
#include "yaml_private.h"
         ^
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/yaml_private.h:5:10: note: in file included from /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/yaml_private.h:5:
#include <yaml.h>
         ^
:1:1: error: ignoring '-fno-PIC' option as it cannot be used with implicit usage of -mabicalls and the N64 ABI
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/include/yaml.h:18:10: error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~~
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/parser.c:42:10: note: in file included from /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/parser.c:42:
#include "yaml_private.h"
         ^
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/yaml_private.h:5:10: note: in file included from /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/yaml_private.h:5:
#include <yaml.h>
         ^
:1:1: error: ignoring '-fno-PIC' option as it cannot be used with implicit usage of -mabicalls and the N64 ABI
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/include/yaml.h:18:10: error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~~
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/api.c:2:10: note: in file included from /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/api.c:2:
#include "yaml_private.h"
         ^
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/yaml_private.h:5:10: note: in file included from /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/yaml_private.h:5:
#include <yaml.h>
         ^
:1:1: error: ignoring '-fno-PIC' option as it cannot be used with implicit usage of -mabicalls and the N64 ABI
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/include/yaml.h:18:10: error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~~
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/emitter.c:2:10: note: in file included from /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/emitter.c:2:
#include "yaml_private.h"
         ^
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/yaml_private.h:5:10: note: in file included from /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/yaml_private.h:5:
#include <yaml.h>
         ^
:1:1: error: ignoring '-fno-PIC' option as it cannot be used with implicit usage of -mabicalls and the N64 ABI
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/include/yaml.h:18:10: error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~~
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/scanner.c:479:10: note: in file included from /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/scanner.c:479:
#include "yaml_private.h"
         ^
/home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/yaml_private.h:5:10: note: in file included from /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/yaml_private.h:5:
#include <yaml.h>
         ^
error: warning(compilation): failed to delete '/home/meghan/dev/zigmod/.zig-cache/tmp/f30a96ade3b92412-reader.o.d': FileNotFound
warning(compilation): failed to delete '/home/meghan/dev/zigmod/.zig-cache/tmp/fa63000dc84a91bf-dumper.o.d': FileNotFound
warning(compilation): failed to delete '/home/meghan/dev/zigmod/.zig-cache/tmp/4678cae5be6a2535-writer.o.d': FileNotFound
warning(compilation): failed to delete '/home/meghan/dev/zigmod/.zig-cache/tmp/940271dc528d9f26-loader.o.d': FileNotFound
warning(compilation): failed to delete '/home/meghan/dev/zigmod/.zig-cache/tmp/ff4c73ffd8d472c0-parser.o.d': FileNotFound
warning(compilation): failed to delete '/home/meghan/dev/zigmod/.zig-cache/tmp/4071b89e663e386a-api.o.d': FileNotFound
warning(compilation): failed to delete '/home/meghan/dev/zigmod/.zig-cache/tmp/f114a56718d82bcc-emitter.o.d': FileNotFound
warning(compilation): failed to delete '/home/meghan/dev/zigmod/.zig-cache/tmp/59c088cca1f13ad8-scanner.o.d': FileNotFound

error: the following command failed with 16 compilation errors:
/home/meghan/.local/share/zig/0.14.0/zig build-lib -freference-trace=256 -cflags -DYAML_VERSION_MAJOR=0 -DYAML_VERSION_MINOR=2 -DYAML_VERSION_PATCH=5 -DYAML_VERSION_STRING="0.2.5" -DYAML_DECLARE_STATIC=1 -- /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/api.c -cflags -DYAML_VERSION_MAJOR=0 -DYAML_VERSION_MINOR=2 -DYAML_VERSION_PATCH=5 -DYAML_VERSION_STRING="0.2.5" -DYAML_DECLARE_STATIC=1 -- /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/dumper.c -cflags -DYAML_VERSION_MAJOR=0 -DYAML_VERSION_MINOR=2 -DYAML_VERSION_PATCH=5 -DYAML_VERSION_STRING="0.2.5" -DYAML_DECLARE_STATIC=1 -- /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/emitter.c -cflags -DYAML_VERSION_MAJOR=0 -DYAML_VERSION_MINOR=2 -DYAML_VERSION_PATCH=5 -DYAML_VERSION_STRING="0.2.5" -DYAML_DECLARE_STATIC=1 -- /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/loader.c -cflags -DYAML_VERSION_MAJOR=0 -DYAML_VERSION_MINOR=2 -DYAML_VERSION_PATCH=5 -DYAML_VERSION_STRING="0.2.5" -DYAML_DECLARE_STATIC=1 -- /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/parser.c -cflags -DYAML_VERSION_MAJOR=0 -DYAML_VERSION_MINOR=2 -DYAML_VERSION_PATCH=5 -DYAML_VERSION_STRING="0.2.5" -DYAML_DECLARE_STATIC=1 -- /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/reader.c -cflags -DYAML_VERSION_MAJOR=0 -DYAML_VERSION_MINOR=2 -DYAML_VERSION_PATCH=5 -DYAML_VERSION_STRING="0.2.5" -DYAML_DECLARE_STATIC=1 -- /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/scanner.c -cflags -DYAML_VERSION_MAJOR=0 -DYAML_VERSION_MINOR=2 -DYAML_VERSION_PATCH=5 -DYAML_VERSION_STRING="0.2.5" -DYAML_DECLARE_STATIC=1 -- /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/writer.c -ODebug -target mips64-linux-musl -mcpu baseline -I /home/meghan/dev/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/include -Mroot -lc --cache-dir /home/meghan/dev/zigmod/.zig-cache --global-cache-dir /home/meghan/.cache/zig --name dummy -static --zig-lib-dir /home/meghan/.local/share/zig/0.14.0/lib/ --listen=- 
Build Summary: 23/27 steps succeeded; 1 failed
install transitive failure
└─ install zigmod transitive failure
   └─ zig build-exe zigmod Debug mips64-linux-musl transitive failure
      ├─ zig build-lib dummy Debug mips64-linux-musl 16 errors
      └─ zig build-lib dummy Debug mips64-linux-musl (+1 more reused dependencies)
error: the following build command failed with exit code 1:
/home/meghan/dev/zigmod/.zig-cache/o/95b5d2c8e921a6cb3fcc06a5454bb36e/build /home/meghan/.local/share/zig/0.14.0/zig /home/meghan/.local/share/zig/0.14.0/lib /home/meghan/dev/zigmod /home/meghan/dev/zigmod/.zig-cache /home/meghan/.cache/zig --seed 0xddab687e -Z680945d7cbcb0d8c -Dtarget=mips64-linux-musl

Expected Behavior

both builds to work

@nektro nektro added the bug Observed behavior contradicts documented or intended behavior label May 22, 2025
@alexrp alexrp self-assigned this May 22, 2025
@alexrp alexrp added zig cc Zig as a drop-in C compiler feature arch-mips 32-bit and 64-bit MIPS labels May 22, 2025
@alexrp alexrp added this to the 0.15.0 milestone May 22, 2025
@nektro
Copy link
Contributor Author

nektro commented May 22, 2025

Diff permalink nektro/zigmod@9d8f820...829e469

@alexrp
Copy link
Member

alexrp commented May 22, 2025

Just to be clear, the correct triple is mips64-linux-muslabi64 (this changed in 0.14.0 to make clear the distinction between muslabi64 and muslabin32). Do you hit the same issues with that as well?

@nektro
Copy link
Contributor Author

nektro commented May 22, 2025

muslabi64 succeeds

@alexrp
Copy link
Member

alexrp commented May 23, 2025

Ok, then I think there's no bug here, at least as far as actual compilation goes.

It is fairly odd that the compiler didn't fail with:

zig/src/main.zig

Lines 3616 to 3618 in 9a3540d

error.LibCUnavailable => {
const triple_name = try target.zigTriple(arena);
std.log.err("unable to find or provide libc for target '{s}'", .{triple_name});

Need to see what's up with that.

@alexrp
Copy link
Member

alexrp commented May 29, 2025

Building the branch you indicated with just zig build and Zig 0.14.0 gets me:

install
└─ install zigmod
   └─ zig build-exe zigmod Debug native
      └─ zig build-lib dummy Debug native 1 errors
error: failed to check cache: '/home/alexrp/Source/tests/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/api.c' file_hash FileNotFound
error: the following command failed with 1 compilation errors:
/home/alexrp/.local/share/zigup/0.14.0/files/zig build-lib -freference-trace=256 -cflags -DYAML_VERSION_MAJOR=0 -DYAML_VERSION_MINOR=2 -DYAML_VERSION_PATCH=5 -DYAML_VERSION_STRING="0.2.5" -DYAML_DECLARE_STATIC=1 -- /home/alexrp/Source/tests/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/api.c -cflags -DYAML_VERSION_MAJOR=0 -DYAML_VERSION_MINOR=2 -DYAML_VERSION_PATCH=5 -DYAML_VERSION_STRING="0.2.5" -DYAML_DECLARE_STATIC=1 -- /home/alexrp/Source/tests/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/dumper.c -cflags -DYAML_VERSION_MAJOR=0 -DYAML_VERSION_MINOR=2 -DYAML_VERSION_PATCH=5 -DYAML_VERSION_STRING="0.2.5" -DYAML_DECLARE_STATIC=1 -- /home/alexrp/Source/tests/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/emitter.c -cflags -DYAML_VERSION_MAJOR=0 -DYAML_VERSION_MINOR=2 -DYAML_VERSION_PATCH=5 -DYAML_VERSION_STRING="0.2.5" -DYAML_DECLARE_STATIC=1 -- /home/alexrp/Source/tests/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/loader.c -cflags -DYAML_VERSION_MAJOR=0 -DYAML_VERSION_MINOR=2 -DYAML_VERSION_PATCH=5 -DYAML_VERSION_STRING="0.2.5" -DYAML_DECLARE_STATIC=1 -- /home/alexrp/Source/tests/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/parser.c -cflags -DYAML_VERSION_MAJOR=0 -DYAML_VERSION_MINOR=2 -DYAML_VERSION_PATCH=5 -DYAML_VERSION_STRING="0.2.5" -DYAML_DECLARE_STATIC=1 -- /home/alexrp/Source/tests/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/reader.c -cflags -DYAML_VERSION_MAJOR=0 -DYAML_VERSION_MINOR=2 -DYAML_VERSION_PATCH=5 -DYAML_VERSION_STRING="0.2.5" -DYAML_DECLARE_STATIC=1 -- /home/alexrp/Source/tests/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/scanner.c -cflags -DYAML_VERSION_MAJOR=0 -DYAML_VERSION_MINOR=2 -DYAML_VERSION_PATCH=5 -DYAML_VERSION_STRING="0.2.5" -DYAML_DECLARE_STATIC=1 -- /home/alexrp/Source/tests/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/src/writer.c -ODebug -I /home/alexrp/Source/tests/zigmod/.zig-cache/zigmod/deps/git/github.com/yaml/libyaml/2c891fc7a770e8ba2fec34fc6b545c672beb37e6/include -Mroot -lc --cache-dir /home/alexrp/Source/tests/zigmod/.zig-cache --global-cache-dir /home/alexrp/.cache/zig --name dummy -static --zig-lib-dir /home/alexrp/.local/share/zigup/0.14.0/files/lib/ --listen=-
Build Summary: 23/27 steps succeeded; 1 failed
install transitive failure
└─ install zigmod transitive failure
   └─ zig build-exe zigmod Debug native transitive failure
      ├─ zig build-lib dummy Debug native 1 errors
      └─ zig build-lib dummy Debug native (+1 more reused dependencies)
error: the following build command failed with exit code 1:
/home/alexrp/Source/tests/zigmod/.zig-cache/o/0b5832bba7d55299accf932761b28601/build /home/alexrp/.local/share/zigup/0.14.0/files/zig /home/alexrp/.local/share/zigup/0.14.0/files/lib /home/alexrp/Source/tests/zigmod /home/alexrp/Source/tests/zigmod/.zig-cache /home/alexrp/.cache/zig --seed 0xcf269e4 -Zffe658edda43c749

@alexrp
Copy link
Member

alexrp commented May 29, 2025

Anyway:

It is fairly odd that the compiler didn't fail with:

This is because a static library is being built, so libc isn't actually being linked. I don't think there's anything particularly great we can do to diagnose this situation right now. #20690 will improve the situation significantly.

That being said, the error about -fno-PIC and -mabicalls does actually indicate a bug in zig cc that will mainly affect compilation for freestanding.

@nektro
Copy link
Contributor Author

nektro commented May 29, 2025

Building the branch you indicated with just zig build and Zig 0.14.0 gets me:

if you cherry-pick nektro/zigmod@71a068a it should reproduce again, apologies

alexrp added a commit to alexrp/zig that referenced this issue May 29, 2025
@alexrp alexrp linked a pull request May 29, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-mips 32-bit and 64-bit MIPS bug Observed behavior contradicts documented or intended behavior zig cc Zig as a drop-in C compiler feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants