Skip to content

rustpkg is not looking at target libraries #11243

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

Closed
alexcrichton opened this issue Dec 31, 2013 · 8 comments
Closed

rustpkg is not looking at target libraries #11243

alexcrichton opened this issue Dec 31, 2013 · 8 comments

Comments

@alexcrichton
Copy link
Member

It appears that rustpkg is only looking at the host libraries, which are notably missing things like rlibs and libnative (for now).

Rustpkg should be looking at the target libraries which have all the necessary goodies in their folders.

@jhasse
Copy link
Contributor

jhasse commented Jan 6, 2014

Should it be looking at target libraries only? I tried that and it results in rustc rejecting the std crate:

testing C:\MinGW\msys\1.0\local\bin\rustc\i686-pc-mingw32\bin\std-3e5aeb83-0.9.dll
C:\MinGW\msys\1.0\local\bin\rustc\i686-pc-mingw32\bin\std-3e5aeb83-0.9.dll is a dylib candidate
get_metadata_section: name .text
get_metadata_section: name .data
get_metadata_section: name .note.rustc
checking 8 bytes of metadata-version stamp
inflating 4167672 bytes of compressed metadata
reading std-3e5aeb83-0.9.dll => 178ms
skipping C:\MinGW\msys\1.0\local\bin\rustc\i686-pc-mingw32\bin\std-3e5aeb83-0.9.dll, crate_id doesn't match
rejected C:\MinGW\msys\1.0\local\bin\rustc\i686-pc-mingw32\bin\std-3e5aeb83-0.9.dll
testing C:\MinGW\msys\1.0\local\bin\rustc\i686-pc-mingw32\bin\syntax-9be99726-0.9.dll
rejected C:\MinGW\msys\1.0\local\bin\rustc\i686-pc-mingw32\bin\syntax-9be99726-0.9.dll
is C:\Users\jhass_000\git\rust-sdl2\.rust\bin\i686-pc-mingw32 in visited_dirs? false
searching C:\Users\jhass_000\git\rust-sdl2\.rust\bin\i686-pc-mingw32
is C:\Users\jhass_000\git\rust-sdl2\bin\i686-pc-mingw32 in visited_dirs? true
C:\Users\jhass_000\git\rust-sdl2\src\demo\main.rs:1:1: 1:1 error: can't find crate for `std`
C:\Users\jhass_000\git\rust-sdl2\src\demo\main.rs:1 extern mod sdl2;
                                                    ^
task '<unnamed>' failed at 'explicit failure', C:\Users\jhass_000\git\rust\src\libsyntax\diagnostic.rs:41
task '<unnamed>' failed at 'receiving on a closed channel', C:\Users\jhass_000\git\rust\src\libstd\comm\mod.rs:728
make: *** [demos] Error 65

@alexcrichton
Copy link
Member Author

Correct, this is what rustc does (looks at target libraries only)

Your installation looks suspicious because rustc should favor looking at rlibs over dlls, and it looks like there were no rlibs found. Additionally, there was a recent version change (0.9-pre => 0.9), so that may be coming into play here (if the compiler is expecting one but finding another)

@jhasse
Copy link
Contributor

jhasse commented Jan 6, 2014

Ahh ... nevermind! I should have ran make clean first ;)

@itdaniher
Copy link
Contributor

Is there a workaround for this until the PR lands?

@jhasse
Copy link
Contributor

jhasse commented Jan 7, 2014

Yes, copy the library over. On Windows:

cp /usr/local/bin/rustlib/i686-pc-mingw32/lib/native-cf55a53a-0.9.dll /usr/local/bin/

@jhasse
Copy link
Contributor

jhasse commented Jan 10, 2014

I need some help fixing the failed tests. When running make check-stage2-rustpkg I get:

run: i686-pc-mingw32/stage2/test/rustpkgtest-i686-pc-mingw32.exe

running 2 tests
test version::test_parse_version ... ok
test version::test_split_version ... ok

metrics saved to: tmp\check-stage2-T-i686-pc-mingw32-H-i686-pc-mingw32-rustpkg-metrics.json
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured

That doesn't sound right. Why does it only run 2 tests?

(IRC is crowded atm, if this is not the right place to ask this, please tell me)

@alexcrichton
Copy link
Member Author

I think that there are far fewer rustpkg tests on windows because they mostly only run on unix right now.

@jhasse
Copy link
Contributor

jhasse commented Jan 10, 2014

Ah thanks! Didn't know that. Time to boot up Linux ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants