Skip to content

Instantly share code, notes, and snippets.

@larsbergstrom
Created November 22, 2013 00:49
Show Gist options
  • Save larsbergstrom/7592758 to your computer and use it in GitHub Desktop.
Save larsbergstrom/7592758 to your computer and use it in GitHub Desktop.
lbergstrom@WIN-2AU2FAC46IO ~/rust-png
$ tup upd
[ tup ] [0.000s] Scanning filesystem...
[ tup ] [0.000s] Reading in new environment variables...
[ tup ] [0.000s] No Tupfiles to parse.
[ tup ] [0.000s] No files to delete.
[ tup ] [0.000s] Executing Commands...
[ ] 0%tup error: file_set_mtime() fstatat failed.
C:\MinGW\msys\1.0\home\lbergstrom\rust-png\rust-png-test.o: No such file or dire
ctory
* 1) rustc --link-args "-L ../libpng" --test -o rust-png-test lib.rs
error: linking with `g++` failed: exit code: 1
note: g++ arguments: -LC:\MinGW\msys\1.0\local\bin\rustc\i686-pc-mingw32\bin -m3
2 -o rust-png-test rust-png-test.o -LC:\MinGW\msys\1.0\local\bin\rustc\i686-pc-m
ingw32\bin -lstd-9ee0eb35-0.9-pre -LC:\MinGW\msys\1.0\local\bin\rustc\i686-pc-mi
ngw32\bin -lrustuv-559f1685-0.9-pre -LC:\MinGW\msys\1.0\local\bin\rustc\i686-pc-
mingw32\bin -lextra-0cee17cd-0.9-pre -L. -lpng -lz -lshim -LC:\MinGW\msys\1.0\ho
me\lbergstrom\rust-png\.rust -LC:\MinGW\msys\1.0\home\lbergstrom\rust-png -lmore
stack -lrustrt -L ../libpng
note: rust-png-test.o:fake:(.text+0x15d3e): undefined reference to `setjmp'
rust-png-test.o:fake:(.text+0x187de): undefined reference to `setjmp'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: rust-png-t
est.o: bad reloc address 0x4 in section `.data'
collect2.exe: error: ld returned 1 exit status
error: aborting due to previous error
task 'rustc' failed at 'explicit failure', C:\MinGW\msys\1.0\home\lbergstrom\rus
t\src\libsyntax\diagnostic.rs:101
task '<main>' failed at 'explicit failure', C:\MinGW\msys\1.0\home\lbergstrom\ru
st\src\librustc\lib.rs:399
*** tup errors ***
*** Command ID=31 failed with return value 101
tup error: Unspecified output files - A command is writing to files that you did
n't specify in the Tupfile. You should add them so tup knows what to expect.
-- Delete: rust-png-test.s at dir 1
-- Delete: rust-png-test.o at dir 1
tup error: Expected to write to file 'rust-png-test' from cmd 31 but didn't
*** Additionally, command 31 failed to process input dependencies. These should
probably be fixed before addressing the command failure.
[ ] 100%
*** tup: 1 job failed.
lbergstrom@WIN-2AU2FAC46IO ~/rust-png
$
RUSTC = rustc
RUSTFLAGS =
: foreach *.c |> gcc -I../libpng -o %o -c %f |> %B.o
: *.o |> ar rcs %o %f |> libshim.a
: lib.rs | libshim.a |> rustc --link-args "-L ../libpng" --test -o %o %f |> rust-png-test
CHECK=@(CHECK)
export CHECK
export RUSTC
export RUSTFLAGS
# run ./tuprules.py lib.rs libshim.a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment