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

Math functions fail to link #11902

Closed
ruuda opened this issue Jun 28, 2016 · 4 comments
Closed

Math functions fail to link #11902

ruuda opened this issue Jun 28, 2016 · 4 comments
Labels

Comments

@ruuda
Copy link
Contributor

@ruuda ruuda commented Jun 28, 2016

When I run ./mach build --release, I get the following output:

[... more errors than my console scrollback ...]
/usr/bin/ld.gold: error: hidden symbol 'floorf' is not defined locally
[... the same error repeated hundreds of time ...]
/usr/bin/ld.gold: error: hidden symbol 'floorf' is not defined locally
/usr/bin/ld.gold: error: hidden symbol 'floorf' is not defined locally
/usr/bin/ld.gold: error: hidden symbol 'ceilf' is not defined locally
/usr/bin/ld.gold: error: hidden symbol 'ceilf' is not defined locally
/usr/bin/ld.gold: error: hidden symbol 'floorf' is not defined locally
/usr/bin/ld.gold: error: hidden symbol 'floorf' is not defined locally
[... more floorf/ceilf errors ...]
/usr/bin/ld.gold: error: hidden symbol 'ceilf' is not defined locally
/usr/bin/ld.gold: error: hidden symbol 'ceilf' is not defined locally
/usr/bin/ld.gold: error: hidden symbol 'floorf' is not defined locally
/usr/bin/ld.gold: error: hidden symbol 'trunc' is not defined locally
/usr/bin/ld.gold: error: hidden symbol 'trunc' is not defined locally
/home/ruud/repos/servo/target/release/deps/libipc_channel-6c27df90414d44d9.rlib(ipc_channel-6c27df90414d44d9.0.o):ipc_channel.0.rs:function ipc_channel::platform::linux::UnixOneShotServer::new::hc931a3844bea8e46: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
collect2: error: ld returned 1 exit status

error: aborting due to previous error
error: Could not compile `servo`.

To learn more, run the command again with --verbose.
Build completed in 0:28:39

I get this on two different machines (both x64 running Arch Linux). A --dev build has the same result. Running ./mach clean has no effect.

This has been the case for a while now, the regression happened a few weeks (or maybe even months?) ago. (I am not sure when. I’ll run a bisect when I have the time.) I have been able to compile Servo on these machines before.

$ ld.gold --version
GNU gold (GNU Binutils 2.26.0.20160501) 1.11
Copyright (C) 2015 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

$ ld --version
GNU ld (GNU Binutils) 2.26.0.20160501
Copyright (C) 2015 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

Possibly relevant environment variables:

CC=clang
CPP=clang -E
CXX=clang++
@jdm jdm added the A-build label Jun 28, 2016
@dns2utf8
Copy link
Contributor

@dns2utf8 dns2utf8 commented Jul 1, 2016

Can confirm

@ruuda
Copy link
Contributor Author

@ruuda ruuda commented Jul 5, 2016

Actually, this is a problem with mozjs (the C++ library) failing to link. Compiling mozjs has been a pain for much longer, but some magic combination going into its source directory and manually calling configure and make with various permutations of flags and environment variables sometimes made it work for me. It is just that recently the way the error is printed changed. Previously it used to say that compiling mozjs_sys failed, but now Cargo just bails out, which is why I thought this was a different error.

Doing cargo build in a fresh clone of servo/mozjs succeeds, but cargo test results in a similar torrent of linker errors. Should I open an issue in the mozjs repository in favour of this one?

@jdm
Copy link
Member

@jdm jdm commented Jul 5, 2016

That would be good, yes.

@ruuda
Copy link
Contributor Author

@ruuda ruuda commented Jul 6, 2016

Closing in favour of servo/mozjs#84.

@ruuda ruuda closed this Jul 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.