error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" ... a lot of stuff
= note: /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
error: aborting due to previous error
Error: failed to compile: Could not compile `failure_derive`.
Error during run
Hi, this is a duplicate of #23 which as issues go is quite tricky. Could you provide your distro and it's version to aid debugging? If there's any new information I'll comment it on #23 and close this issue as a duplicate.
Hi @RazrFalcon could you provide your system information to aid in working on this?
What kind of information do you need?
Gentoo Linux x86_64
Version number if applicable (but gentoo uses rolling releases so it's not), which linker and version number might be helpful as it's a linking issue (guessing it's ld)
% emerge --info
Portage 2.3.24 (python 3.5.4-final-0, default/linux/amd64/17.0, gcc-6.4.0, glibc-2.26-r6, 4.9.76-gentoo-r1 x86_64)
=================================================================
System uname: Linux-4.9.76-gentoo-r1-x86_64-Intel-R-_Core-TM-_i5-3570K_CPU_@_3.40GHz-with-gentoo-2.4.1
KiB Mem: 8114432 total, 6032920 free
KiB Swap: 0 total, 0 free
Timestamp of repository gentoo: Sat, 14 Apr 2018 15:09:40 +0000
Head commit of repository gentoo: c5a75bcb138d7e8d2021426b2f19e24936e4f12c
sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash: 4.4_p12::gentoo
dev-lang/perl: 5.24.3-r1::gentoo
dev-lang/python: 2.7.14-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake: 3.9.6::gentoo
dev-util/pkgconfig: 0.29.2::gentoo
sys-apps/baselayout: 2.4.1-r2::gentoo
sys-apps/openrc: 0.34.11::gentoo
sys-apps/sandbox: 2.13::gentoo
sys-devel/autoconf: 2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake: 1.11.6-r3::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils: 2.29.1-r1::gentoo
sys-devel/gcc: 6.4.0-r1::gentoo
sys-devel/gcc-config: 1.8-r1::gentoo
sys-devel/libtool: 2.4.6-r3::gentoo
sys-devel/make: 4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc: 2.26-r6::gentoo
Repositories:
gentoo
location: /usr/portage
sync-type: git
sync-uri: https://github.com/gentoo-mirror/gentoo
priority: -1000
localrepo
location: /usr/local/portage
masters: gentoo
priority: 0
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -s"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -s"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet --load-average 4.0"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news nodoc noinfo noman parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl amd64 berkdb bzip2 cli crypt cxx dri fontconfig gdbm iconv ipv6 modules ncurses nptl openmp pam pcre qt5 readline seccomp ssl tcpd threads unicode xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="sse sse2 sse3 sse4 sse4_1 sse4_2 ssse3 mmx mmxext avx aes" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Awesome, thanks!: can't promise this will be fixed soon as it's been a persistently difficult thing but every bit of information helps :+1:
@xd009642 having similar issue using latest Docker image on macOS (Docker for Mac 18.03.1-ce-mac65 (24312)):
docker run --rm -v "$(pwd)":/app -w /app \
-e CARGO_HOME=".cache/cargo/" \
xd009642/tarpaulin \
cargo tarpaulin --skip-clean --ignore-tests --forward
results in
Building project
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/usr/local/rustup/toolchains/1.26.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.juniper_codegen0.rcgu.o" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.juniper_codegen1.rcgu.o" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.juniper_codegen10.rcgu.o" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.juniper_codegen11.rcgu.o" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.juniper_codegen12.rcgu.o" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.juniper_codegen13.rcgu.o" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.juniper_codegen14.rcgu.o" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.juniper_codegen15.rcgu.o" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.juniper_codegen2.rcgu.o" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.juniper_codegen3.rcgu.o" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.juniper_codegen4.rcgu.o" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.juniper_codegen5.rcgu.o" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.juniper_codegen6.rcgu.o" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.juniper_codegen7.rcgu.o" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.juniper_codegen8.rcgu.o" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.juniper_codegen9.rcgu.o" "-o" "/app/target/debug/deps/libjuniper_codegen-75dbcc6806bad7d7.so" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.crate.metadata.rcgu.o" "/app/target/debug/deps/juniper_codegen-75dbcc6806bad7d7.crate.allocator.rcgu.o" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "-L" "/app/target/debug/deps" "-L" "/usr/local/rustup/toolchains/1.26.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/app/target/debug/deps/libsyn-b08e1e76b6043602.rlib" "/app/target/debug/deps/libsynom-d9f6ade45ff5f388.rlib" "/app/target/debug/deps/libunicode_xid-d9790fbe52eafa0d.rlib" "/app/target/debug/deps/libquote-87fdc82d0d1b1520.rlib" "-L" "/usr/local/rustup/toolchains/1.26.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bdynamic" "-l" "proc_macro-5ce307c50ca2c20a" "-L" "/usr/local/rustup/toolchains/1.26.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "syntax-b26550d16e3a261d" "-L" "/usr/local/rustup/toolchains/1.26.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_errors-4dee84831ff847ca" "-L" "/usr/local/rustup/toolchains/1.26.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "syntax_pos-d89c3e556adf7182" "-L" "/usr/local/rustup/toolchains/1.26.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_data_structures-76942dc28ff7a2d6" "-L" "/usr/local/rustup/toolchains/1.26.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "serialize-c00dfa3a55702cbf" "-L" "/usr/local/rustup/toolchains/1.26.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_cratesio_shim-fc510c5115b4596c" "-Wl,--start-group" "-L" "/usr/local/rustup/toolchains/1.26.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "std-912509c5d8c60ccd" "-Wl,--end-group" "-Wl,-Bstatic" "/usr/local/rustup/toolchains/1.26.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-66d072e25a9acee3.rlib" "-Wl,-Bdynamic" "-l" "util" "-l" "util" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util" "-l" "util" "-shared" "-no-pie"
= note: /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
error: aborting due to previous error
@xd009642 Now that #23 is closed, should this be closed as well?
@yodaldevoid But it still doesn't work.
Have you tried it with the latest version from the develop branch?
@xd009642 No. Only the one from the crates.io.
Ah travis is still doing the release run to upload to github releases and cargo. It'll be version 0.6.1 when it's done (might take a while)
It's just uploaded! Let us know if it works - just to be extra sure
Yes, it works now. Thanks!
Excellent! Closing this issue now then. :tada:
Most helpful comment
Yes, it works now. Thanks!