riverrun/comeonin

/usr/bin/ld: cannot find crti.o: No such file or directory

ghenry opened this issue · 2 comments

Environment

  • Elixir & Erlang/OTP versions (elixir --version):

Erlang/OTP 22 [erts-10.5.6] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]

Elixir 1.9.2 (compiled with Erlang/OTP 22)

  • Operating system:

Fedora 31 64bit

Current behavior

Won't build even though Development Tools installed

Expected behavior

To build.

Additional information

 ~/src/elixir-phoenix-realworld-example-app/deps/comeonin [master*]$ make
mkdir -p priv
cc -g -O3 -Wall -I/usr/lib64/erlang/erts-10.5.6/include -Ic_src -fPIC -shared  c_src/bcrypt_nif.c c_src/blowfish.c -o priv/bcrypt_nif.so
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:30: priv/bcrypt_nif.so] Error 1

 ~/src/elixir-phoenix-realworld-example-app/deps/comeonin [master*]$ cd ../../
 ~/src/elixir-phoenix-realworld-example-app [master*]$ mix phx.server
==> comeonin
mkdir -p priv
cc -g -O3 -Wall -I/usr/lib64/erlang/erts-10.5.6/include -Ic_src -fPIC -shared  c_src/bcrypt_nif.c c_src/blowfish.c -o priv/bcrypt_nif.so
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:30: priv/bcrypt_nif.so] Error 1
could not compile dependency :comeonin, "mix compile" failed. You can recompile this dependency with "mix deps.compile comeonin", update it with "mix deps.update comeonin" or clean it with "mix deps.clean comeonin"
==> real_world
** (Mix) Could not compile with "make" (exit status: 2).
You need to have gcc and make installed. If you are using
Ubuntu or any other Debian-based system, install the packages
"build-essential". Also install "erlang-dev" package if not
included in your Erlang/OTP version. If you're on Fedora, run
"dnf group install 'Development Tools'".

Some more info:

 ~/src/elixir-phoenix-realworld-example-app [master*]$ locate crti.o
/home/linuxbrew/.linuxbrew/Cellar/gcc/5.5.0_4/lib/gcc/x86_64-unknown-linux-gnu/5.5.0/crti.o
/usr/lib64/crti.o

 ~/src/elixir-phoenix-realworld-example-app [master*]$ file /usr/lib64/crti.o 
/usr/lib64/crti.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped

 ~/src/elixir-phoenix-realworld-example-app [master*]$ ls -lh /usr/lib64/crti.o 
-rw-r--r-- 1 root root 1.8K Dec  4 17:04 /usr/lib64/crti.o

 ~/src/elixir-phoenix-realworld-example-app [master*]$ rpm -qf /usr/lib64/crti.o 
glibc-devel-2.30-8.fc31.x86_64

Not your issue. Getting this on same box with Go:

# runtime/cgo
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status

Apologies for the noise.