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

tinycc: fix build on darwin #100748

Closed
wants to merge 1 commit into from
Closed

Conversation

siraben
Copy link
Member

@siraben siraben commented Oct 16, 2020

Motivation for this change

Fix build of tinycc on darwin (macOS for me)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@siraben
Copy link
Member Author

siraben commented Oct 16, 2020

Current build log.

Build log
$ nix-build -A tinycc                           
these derivations will be built:
  /nix/store/2s62izvk9958m823dwl3b9fhs17g5qcp-tcc-0.9.27.drv
building '/nix/store/2s62izvk9958m823dwl3b9fhs17g5qcp-tcc-0.9.27.drv'...
unpacking sources
unpacking source archive /nix/store/88zp96ahazyb5l9gg0gmv0g934021rg1-source
source root is source
patching sources
configuring
configure flags: --disable-static --prefix=/nix/store/9f5d3bfqfa551sapw19sn5dq0049n25j-tcc-0.9.27 --sysincludepaths=/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/include --libpaths=/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib --crtprefix=/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib
Binary directory    /nix/store/9f5d3bfqfa551sapw19sn5dq0049n25j-tcc-0.9.27/bin
TinyCC directory    /nix/store/9f5d3bfqfa551sapw19sn5dq0049n25j-tcc-0.9.27/lib/tcc
Library directory   /nix/store/9f5d3bfqfa551sapw19sn5dq0049n25j-tcc-0.9.27/lib
Include directory   /nix/store/9f5d3bfqfa551sapw19sn5dq0049n25j-tcc-0.9.27/include
Manual directory    /nix/store/9f5d3bfqfa551sapw19sn5dq0049n25j-tcc-0.9.27/share/man
Info directory      /nix/store/9f5d3bfqfa551sapw19sn5dq0049n25j-tcc-0.9.27/share/info
Doc directory       /nix/store/9f5d3bfqfa551sapw19sn5dq0049n25j-tcc-0.9.27/share/doc
/usr/include dir    /nix/store/0h2h20ksfx8vrbbd4ccyncr4q56lywhq-SDKs/MacOSX10.12.sdk/usr/include
Source path         /private/var/folders/s1/sm71lqk553d1_f8drd3tz_5r0000gn/T/nix-build-tcc-0.9.27.drv-0/source
C compiler          gcc (9.3)
Target OS           Darwin
CPU                 x86_64
Config              OSX static=no
Creating config.mak and config.h
building
build flags: -j4 -l4 SHELL=/nix/store/8i9kyqfxhk2s9dzx32x0sgdk7kyx9wjc-bash-4.4-p23/bin/bash
gcc -o tcc.o -c tcc.c -DCONFIG_USR_INCLUDE="\"/nix/store/0h2h20ksfx8vrbbd4ccyncr4q56lywhq-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-format-truncation -I. 
gcc -o tccgen.o -c tccgen.c -DCONFIG_USR_INCLUDE="\"/nix/store/0h2h20ksfx8vrbbd4ccyncr4q56lywhq-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-format-truncation -I. 
gcc -o tccelf.o -c tccelf.c -DCONFIG_USR_INCLUDE="\"/nix/store/0h2h20ksfx8vrbbd4ccyncr4q56lywhq-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-format-truncation -I. 
gcc -o tccasm.o -c tccasm.c -DCONFIG_USR_INCLUDE="\"/nix/store/0h2h20ksfx8vrbbd4ccyncr4q56lywhq-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-format-truncation -I. 
gcc -o tccrun.o -c tccrun.c -DCONFIG_USR_INCLUDE="\"/nix/store/0h2h20ksfx8vrbbd4ccyncr4q56lywhq-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-format-truncation -I. 
gcc -o x86_64-gen.o -c x86_64-gen.c -DCONFIG_USR_INCLUDE="\"/nix/store/0h2h20ksfx8vrbbd4ccyncr4q56lywhq-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-format-truncation -I. 
gcc -o x86_64-link.o -c x86_64-link.c -DCONFIG_USR_INCLUDE="\"/nix/store/0h2h20ksfx8vrbbd4ccyncr4q56lywhq-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-format-truncation -I. 
gcc -o i386-asm.o -c i386-asm.c -DCONFIG_USR_INCLUDE="\"/nix/store/0h2h20ksfx8vrbbd4ccyncr4q56lywhq-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-format-truncation -I. 
gcc -o tccmacho.o -c tccmacho.c -DCONFIG_USR_INCLUDE="\"/nix/store/0h2h20ksfx8vrbbd4ccyncr4q56lywhq-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-format-truncation -I. 
In file included from /nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/include/string.h:192,
                 from tcc.h:31,
                 from tccmacho.c:18:
tccmacho.c: In function 'add_segment':
tccmacho.c:265:5: warning: '__builtin_strncpy' specified bound 16 equals destination size [-Wstringop-truncation]
  265 |     strncpy(sc->segname, name, 16);
      |     ^~~~~~~
In function 'add_section',
    inlined from 'collect_sections' at tccmacho.c:649:22,
    inlined from 'macho_output_file' at tccmacho.c:814:9:
tccmacho.c:285:5: warning: '__builtin_strncpy' specified bound 16 equals destination size [-Wstringop-truncation]
  285 |     strncpy(sec->sectname, name, 16);
      |     ^~~~~~~
perl ./texi2pod.pl tcc-doc.texi tcc-doc.pod
makeinfo --no-split --html --number-sections -o tcc-doc.html tcc-doc.texi
makeinfo tcc-doc.texi || true
pod2man --section=1 --center="Tiny C Compiler" --release="0.9.27" tcc-doc.pod >tcc.1 && rm -f tcc-doc.pod
gcc -o tccpp.o -c tccpp.c -DCONFIG_USR_INCLUDE="\"/nix/store/0h2h20ksfx8vrbbd4ccyncr4q56lywhq-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-format-truncation -I. 
gcc -o libtcc.o -c libtcc.c -DCONFIG_USR_INCLUDE="\"/nix/store/0h2h20ksfx8vrbbd4ccyncr4q56lywhq-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/qbbl5g6l5kx3zwjmkbcwflrzfrk6by0g-Libsystem-osx-10.12.6/usr/lib\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-format-truncation -I. 
gcc -dynamiclib -current_version 0.9.27 -compatibility_version 0.9.27 -install_name @rpath/libtcc.dylib -o libtcc.dylib libtcc.o tccpp.o tccgen.o tccelf.o tccasm.o tccrun.o x86_64-gen.o x86_64-link.o i386-asm.o tccmacho.o -flat_namespace -undefined warning 
ld: warning: passed two min versions (10.6.0, 10.12) for platform macOS. Using 10.12.
gcc -o tcc tcc.o libtcc.dylib -lm -lpthread -ldl -flat_namespace -undefined warning -Wl,-rpath,"@executable_path/." -Wl,-rpath,"/nix/store/9f5d3bfqfa551sapw19sn5dq0049n25j-tcc-0.9.27/lib"
ld: warning: passed two min versions (10.6.0, 10.12) for platform macOS. Using 10.12.
make[1]: Entering directory '/private/var/folders/s1/sm71lqk553d1_f8drd3tz_5r0000gn/T/nix-build-tcc-0.9.27.drv-0/source/lib'
../tcc -c libtcc1.c -o libtcc1.o -B.. -I..
../tcc -c va_list.c -o va_list.o -B.. -I..
../tcc -c bt-exe.c -o ../bt-exe.o -B.. -I..
In file included from bt-exe.c:6:
In file included from ../tccrun.c:21:
In file included from ../tcc.h:28:
../tcc.h:28: error: include file 'stdarg.h' not found
make[1]: *** [Makefile:83: ../bt-exe.o] Error 1
make[1]: Leaving directory '/private/var/folders/s1/sm71lqk553d1_f8drd3tz_5r0000gn/T/nix-build-tcc-0.9.27.drv-0/source/lib'
make: *** [Makefile:269: libtcc1.a] Error 2
builder for '/nix/store/2s62izvk9958m823dwl3b9fhs17g5qcp-tcc-0.9.27.drv' failed with exit code 2
error: build of '/nix/store/2s62izvk9958m823dwl3b9fhs17g5qcp-tcc-0.9.27.drv' failed

@r-burns
Copy link
Contributor

r-burns commented Oct 17, 2020

I got tcc to build on my mac with the following changes:

diff --git a/pkgs/development/compilers/tinycc/default.nix b/pkgs/development/compilers/tinycc/default.nix
index 03e8be7053a..d74a3ebe790 100644
--- a/pkgs/development/compilers/tinycc/default.nix
+++ b/pkgs/development/compilers/tinycc/default.nix
@@ -1,4 +1,11 @@
-{ stdenv, lib, fetchFromRepoOrCz, perl, texinfo }:
+{ stdenv, lib
+, fetchFromRepoOrCz
+, darwin
+, perl
+, texinfo
+, which
+, xcbuild
+}:
 with lib;
 
 stdenv.mkDerivation rec {
@@ -8,11 +15,12 @@ stdenv.mkDerivation rec {
 
   src = fetchFromRepoOrCz {
     repo = "tinycc";
-    rev = upstreamVersion;
-    sha256 = "12mm1lqywz0akr2yb2axjfbw8lwv57nh395vzsk534riz03ml977";
+    rev = "78da4586a002275e7f4c29d0f545430f1fc055e7";
+    sha256 = "00piy8gvnf3g8agibrlplc4jr7sifaafvwgd2dgyxb6lrj2psw1n";
   };
 
-  nativeBuildInputs = [ perl texinfo ];
+  nativeBuildInputs = [ perl texinfo which ]
+    ++ optional stdenv.isDarwin xcbuild;
 
   hardeningDisable = [ "fortify" ];
 
@@ -21,6 +29,9 @@ stdenv.mkDerivation rec {
   postPatch = ''
     substituteInPlace "texi2pod.pl" \
       --replace "/usr/bin/perl" "${perl}/bin/perl"
+  '' + optionalString stdenv.isDarwin ''
+    substituteInPlace tests/tests2/Makefile \
+      --replace 'SKIP = ' 'SKIP = 106_pthread.test '
   '';
 
   preConfigure = ''
@@ -77,7 +88,7 @@ stdenv.mkDerivation rec {
     homepage = "http://www.tinycc.org/";
     license = licenses.mit;
 
-    platforms = [ "x86_64-linux" ];
+    platforms = platforms.unix;
     maintainers = [ maintainers.joachifm ];
   };
 }

Since this isn't a tagged release, should it be marked as unstable and added to toplevel as e.g. tccUnstable? It's been a while since the last release, maybe someone can pester the maintainers to tag a new one :P

@@ -1,4 +1,11 @@
{ stdenv, lib, fetchFromRepoOrCz, perl, texinfo }:
{ stdenv, lib
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{ stdenv, lib
{ stdenv

@@ -8,11 +15,12 @@ stdenv.mkDerivation rec {

src = fetchFromRepoOrCz {
repo = "tinycc";
rev = upstreamVersion;
sha256 = "12mm1lqywz0akr2yb2axjfbw8lwv57nh395vzsk534riz03ml977";
rev = "78da4586a002275e7f4c29d0f545430f1fc055e7";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the version.

, texinfo
, which
, xcbuild
}:
with lib;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
with lib;
with stdenv.lib;

I am not a fan of using with on the entire expression. This should be refactored if possible.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I wasn't sure to refactor that since it was the original expression. I agree.

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 100748 run on x86_64-linux 1

2 packages built:
  • nrpl
  • tinycc

@SuperSandro2000
Copy link
Member

Fails to build on Darwin:

@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/88zp96ahazyb5l9gg0gmv0g934021rg1-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
configure flags: --disable-static --prefix=/nix/store/v73wgpy49fh56y7qim9pf7i6alwhg7il-tcc-0.9.27 --cc=cc --elfinterp=/usr/lib/dyld --crtprefix=/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib --sysincludepaths=/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/include:\{B\}/include --libpaths=/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib
Binary directory    /nix/store/v73wgpy49fh56y7qim9pf7i6alwhg7il-tcc-0.9.27/bin
TinyCC directory    /nix/store/v73wgpy49fh56y7qim9pf7i6alwhg7il-tcc-0.9.27/lib/tcc
Library directory   /nix/store/v73wgpy49fh56y7qim9pf7i6alwhg7il-tcc-0.9.27/lib
Include directory   /nix/store/v73wgpy49fh56y7qim9pf7i6alwhg7il-tcc-0.9.27/include
Manual directory    /nix/store/v73wgpy49fh56y7qim9pf7i6alwhg7il-tcc-0.9.27/share/man
Info directory      /nix/store/v73wgpy49fh56y7qim9pf7i6alwhg7il-tcc-0.9.27/share/info
Doc directory       /nix/store/v73wgpy49fh56y7qim9pf7i6alwhg7il-tcc-0.9.27/share/doc
/usr/include dir    /nix/store/afpv8r50svbrmdmk56wcwpzyp5zac3l5-SDKs/MacOSX10.12.sdk/usr/include
Source path         /private/tmp/nix-build-tcc-0.9.27.drv-0/source
C compiler          cc (7.1)
Target OS           Darwin
CPU                 x86_64
Config              OSX static=no
Creating config.mak and config.h
@nix { "action": "setPhase", "phase": "buildPhase" }
building
build flags: -j4 -l4 SHELL=/nix/store/k89nm2jva0qmvd970f84wq2iq1iwm9bs-bash-4.4-p23/bin/bash
cc -o tcc.o -c tcc.c -DCONFIG_USR_INCLUDE="\"/nix/store/afpv8r50svbrmdmk56wcwpzyp5zac3l5-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/include:{B}/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_ELFINTERP="\"/usr/lib/dyld\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-string-plus-int -I. 
cc -o libtcc.o -c libtcc.c -DCONFIG_USR_INCLUDE="\"/nix/store/afpv8r50svbrmdmk56wcwpzyp5zac3l5-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/include:{B}/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_ELFINTERP="\"/usr/lib/dyld\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-string-plus-int -I. 
cc -o tccpp.o -c tccpp.c -DCONFIG_USR_INCLUDE="\"/nix/store/afpv8r50svbrmdmk56wcwpzyp5zac3l5-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/include:{B}/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_ELFINTERP="\"/usr/lib/dyld\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-string-plus-int -I. 
cc -o tccgen.o -c tccgen.c -DCONFIG_USR_INCLUDE="\"/nix/store/afpv8r50svbrmdmk56wcwpzyp5zac3l5-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/include:{B}/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_ELFINTERP="\"/usr/lib/dyld\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-string-plus-int -I. 
cc -o tccelf.o -c tccelf.c -DCONFIG_USR_INCLUDE="\"/nix/store/afpv8r50svbrmdmk56wcwpzyp5zac3l5-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/include:{B}/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_ELFINTERP="\"/usr/lib/dyld\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-string-plus-int -I. 
cc -o tccasm.o -c tccasm.c -DCONFIG_USR_INCLUDE="\"/nix/store/afpv8r50svbrmdmk56wcwpzyp5zac3l5-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/include:{B}/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_ELFINTERP="\"/usr/lib/dyld\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-string-plus-int -I. 
cc -o tccrun.o -c tccrun.c -DCONFIG_USR_INCLUDE="\"/nix/store/afpv8r50svbrmdmk56wcwpzyp5zac3l5-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/include:{B}/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_ELFINTERP="\"/usr/lib/dyld\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-string-plus-int -I. 
cc -o x86_64-gen.o -c x86_64-gen.c -DCONFIG_USR_INCLUDE="\"/nix/store/afpv8r50svbrmdmk56wcwpzyp5zac3l5-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/include:{B}/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_ELFINTERP="\"/usr/lib/dyld\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-string-plus-int -I. 
cc -o x86_64-link.o -c x86_64-link.c -DCONFIG_USR_INCLUDE="\"/nix/store/afpv8r50svbrmdmk56wcwpzyp5zac3l5-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/include:{B}/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_ELFINTERP="\"/usr/lib/dyld\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-string-plus-int -I. 
cc -o i386-asm.o -c i386-asm.c -DCONFIG_USR_INCLUDE="\"/nix/store/afpv8r50svbrmdmk56wcwpzyp5zac3l5-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/include:{B}/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_ELFINTERP="\"/usr/lib/dyld\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-string-plus-int -I. 
cc -o tccmacho.o -c tccmacho.c -DCONFIG_USR_INCLUDE="\"/nix/store/afpv8r50svbrmdmk56wcwpzyp5zac3l5-SDKs/MacOSX10.12.sdk/usr/include\"" -DCONFIG_TCC_SYSINCLUDEPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/include:{B}/include\"" -DCONFIG_TCC_LIBPATHS="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_CRTPREFIX="\"/nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib\"" -DCONFIG_TCC_ELFINTERP="\"/usr/lib/dyld\"" -DTCC_TARGET_X86_64 -DTCC_TARGET_MACHO       -DONE_SOURCE=0 -Wall -O2 -Wdeclaration-after-statement -fno-strict-aliasing -fheinous-gnu-extensions -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-string-plus-int -I. 
perl ./texi2pod.pl tcc-doc.texi tcc-doc.pod
makeinfo --no-split --html --number-sections -o tcc-doc.html tcc-doc.texi
makeinfo tcc-doc.texi || true
pod2man --section=1 --center="Tiny C Compiler" --release="0.9.27" tcc-doc.pod >tcc.1 && rm -f tcc-doc.pod
cc -dynamiclib -current_version 0.9.27 -compatibility_version 0.9.27 -install_name @rpath/libtcc.dylib -o libtcc.dylib libtcc.o tccpp.o tccgen.o tccelf.o tccasm.o tccrun.o x86_64-gen.o x86_64-link.o i386-asm.o tccmacho.o -flat_namespace -undefined warning 
cc -o tcc tcc.o libtcc.dylib -lm -lpthread -ldl -flat_namespace -undefined warning -Wl,-rpath,"@executable_path/." -Wl,-rpath,"/nix/store/v73wgpy49fh56y7qim9pf7i6alwhg7il-tcc-0.9.27/lib"
make[1]: Entering directory '/private/tmp/nix-build-tcc-0.9.27.drv-0/source/lib'
../tcc -c libtcc1.c -o libtcc1.o -B.. -I..
../tcc -c alloca86_64.S -o alloca86_64.o -B.. -I..
../tcc -c alloca86_64-bt.S -o alloca86_64-bt.o -B.. -I..
../tcc -c va_list.c -o va_list.o -B.. -I..
../tcc -c bt-exe.c -o ../bt-exe.o -B.. -I..
../tcc -c bt-log.c -o ../bt-log.o -B.. -I..
../tcc -c bcheck.c -o ../bcheck.o -B.. -I.. -g
../tcc -ar rcs ../libtcc1.a libtcc1.o alloca86_64.o alloca86_64-bt.o va_list.o
make[1]: Leaving directory '/private/tmp/nix-build-tcc-0.9.27.drv-0/source/lib'
@nix { "action": "setPhase", "phase": "checkPhase" }
running tests
check flags: -j4 -l4 SHELL=/nix/store/k89nm2jva0qmvd970f84wq2iq1iwm9bs-bash-4.4-p23/bin/bash VERBOSE=y test
make[1]: Entering directory '/private/tmp/nix-build-tcc-0.9.27.drv-0/source/tests'
------------ hello-exe ------------
------------ hello-run ------------
tcc: error: library 'c' not found
tcc: error: library 'c' not found
tcc: error: undefined symbol '_printf'
+ ../tcc -vv
+ ../tcc -vv
tcc version 0.9.27 (x86_64 Darwin)
install: /nix/store/v73wgpy49fh56y7qim9pf7i6alwhg7il-tcc-0.9.27/lib/tcc
include:
  /nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/include
  /nix/store/v73wgpy49fh56y7qim9pf7i6alwhg7il-tcc-0.9.27/lib/tcc/include
libraries:
  /nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib
libtcc1:
  /nix/store/v73wgpy49fh56y7qim9pf7i6alwhg7il-tcc-0.9.27/lib/tcc/libtcc1.a
crt:
  /nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib
elfinterp:
  /usr/lib/dyld
tcc version 0.9.27 (x86_64 Darwin)
install: /nix/store/v73wgpy49fh56y7qim9pf7i6alwhg7il-tcc-0.9.27/lib/tcc
include:
  /nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/include
  /nix/store/v73wgpy49fh56y7qim9pf7i6alwhg7il-tcc-0.9.27/lib/tcc/include
libraries:
  /nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib
libtcc1:
  /nix/store/v73wgpy49fh56y7qim9pf7i6alwhg7il-tcc-0.9.27/lib/tcc/libtcc1.a
crt:
  /nix/store/i09q4si3r6ad3iblrdjxfmvl8bks6amg-Libsystem-osx-10.12.6/lib
elfinterp:
  /usr/lib/dyld
+ otool -L ../tcc
+ otool -L ../tcc
../tcc:
../tcc:
	@rpath/libtcc.dylib (compatibility version 0.9.27, current version 0.9.27)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
	@rpath/libtcc.dylib (compatibility version 0.9.27, current version 0.9.27)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
+ exit 1
+ exit 1
make[2]: *** [Makefile:99: hello-exe] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:103: hello-run] Error 1
make[1]: *** [Makefile:95: all] Error 2
make[1]: Leaving directory '/private/tmp/nix-build-tcc-0.9.27.drv-0/source/tests'
make: *** [Makefile:393: test] Error 2

@stale
Copy link

stale bot commented Jun 3, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2021
@r-burns r-burns mentioned this pull request Oct 9, 2021
14 tasks
@r-burns
Copy link
Contributor

r-burns commented Oct 10, 2021

@siraben still interested?

We''ll need to update tinycc to get it working with the upcoming glibc 2.34 bump. Upstream is going strong with no tags in sight so I think a bump to unstable is overdue.

Happy to open a new PR for this if you'd prefer to hand it off.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 10, 2021
@siraben
Copy link
Member Author

siraben commented Oct 10, 2021

Hey, @r-burns, thanks for the interest. I'm currently too busy to debug the failure but I'd be happy to review your PR.

@Artturin Artturin closed this Oct 10, 2021
@siraben siraben deleted the tinycc-darwin branch October 10, 2021 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants