Comments (6)
Hi @antonie3007,
Could you run:
mix clean --deps
V=1 mix compile
I think that you may have CFLAGS
or LDFLAGS
defined in your environment and the value is getting used. The V=1
part will show what's being passed to gcc.
from circuits_uart.
Hi @fhunleth
Here is the result.
==> circuits_uart
mkdir -p /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/priv
mkdir -p /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj
mkdir -p /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/ei_copy
CC circuits_uart.o
cc -c -I/usr/lib64/erlang/usr/include -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/circuits_uart.o src/circuits_uart.c
CC debug_tests.o
cc -c -I/usr/lib64/erlang/usr/include -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/debug_tests.o src/debug_tests.c
CC erlcmd.o
cc -c -I/usr/lib64/erlang/usr/include -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/erlcmd.o src/erlcmd.c
CC uart_comm.o
cc -c -I/usr/lib64/erlang/usr/include -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_comm.o src/uart_comm.c
CC uart_comm_unix.o
cc -c -I/usr/lib64/erlang/usr/include -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_comm_unix.o src/uart_comm_unix.c
CC uart_comm_win.o
cc -c -I/usr/lib64/erlang/usr/include -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_comm_win.o src/uart_comm_win.c
CC uart_enum.o
cc -c -I/usr/lib64/erlang/usr/include -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_enum.o src/uart_enum.c
CC uart_enum_linux.o
cc -c -I/usr/lib64/erlang/usr/include -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_enum_linux.o src/uart_enum_linux.c
CC uart_enum_osx.o
cc -c -I/usr/lib64/erlang/usr/include -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_enum_osx.o src/uart_enum_osx.c
CC uart_enum_win.o
cc -c -I/usr/lib64/erlang/usr/include -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_enum_win.o src/uart_enum_win.c
CC util.o
cc -c -I/usr/lib64/erlang/usr/include -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/util.o src/util.c
LD circuits_uart
cc /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/circuits_uart.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/debug_tests.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/erlcmd.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_comm.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_comm_unix.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_comm_win.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_enum.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_enum_linux.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_enum_osx.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_enum_win.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/util.o -L/usr/lib64/erlang/usr/lib -lei -lrt -o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/priv/circuits_uart
/usr/bin/ld: /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so: error loading plugin: /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so: verkeerde ELF-klasse: ELFCLASS64
collect2: fout: ld gaf exit-status 1 terug
make: *** [src/Makefile:111: /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/priv/circuits_uart] Fout 1
from circuits_uart.
As far as I can see the CFLAGS and LDFLAGS are NOT defined in my environment
echo $CFLAGS and echo $LDFLAGS give an empty response
Regards Antonie,
from circuits_uart.
Hmm. My next guess is that this is coming from a compilation mismatch between the defaults (which Circuits.UART is getting) and whatever Erlang is compiled with.
The way to figure that out is by removing -L/usr/lib64/erlang/usr/lib -lei
from the link step and trying it again:
cc /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/circuits_uart.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/debug_tests.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/erlcmd.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_comm.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_comm_unix.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_comm_win.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_enum.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_enum_linux.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_enum_osx.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/uart_enum_win.o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/obj/util.o -lrt -o /home/antonie/Projects/TrackTimer_V2.0/02-TrackTimer_Main_Module/02-tracktimer_server/elixir/tracktimer_2.0.3/_build/dev/lib/circuits_uart/priv/circuits_uart
You'll get errors about ei
library functions not being found, but the ELFCLASS64
one should go away.
If this happens, then I'm not sure why. Maybe some google searches could lead you to some hints? I almost exclusively use asdf to install Erlang, so if that's an option, then I'd probably give that a try.
from circuits_uart.
Hmmmmm,
Retrying it with the command you send me stil get's me the error error loading plugin: /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so: wrong ELF-class: ELFCLASS64
I've tried installing Erlang and Elixir with asdf but I get the error:
checking whether the C compiler works... no
configure: error: in `/home/antonie/.asdf/plugins/erlang/kerl-home/builds/asdf_24.0/otp_src_24.0/erts':
configure: error: C compiler cannot create executables
See `config.log' for more details
and the config.log tells me:
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.1 20230401 (Red Hat 13.0.1-0) (GCC)
... rest of stderr output deleted ...
configure:4339: $? = 0
configure:4328: gcc -V >&5
gcc: error: unrecognized command-line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:4339: $? = 1
configure:4328: gcc -qversion >&5
gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:4339: $? = 1
configure:4328: gcc -version >&5
gcc: error: unrecognized command-line option '-version'
gcc: fatal error: no input files
compilation terminated.
configure:4339: $? = 1
configure:4359: checking whether the C compiler works
configure:4381: gcc conftest.c >&5
/usr/bin/ld: /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so: error loading plugin: /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so: wrong ELF class: ELFCLASS64
collect2: error: ld returned 1 exit status
configure:4385: $? = 1
configure:4425: result: no
This seems like the same error of the liblto_plugin.so
Now I'am really lost...
regards Antonie
from circuits_uart.
Hi @fhunleth ,
Could this be an issue with Fedora 38 because it had an GNU Toolchain Update (gcc 13.0, binutils 2.39, glibc 2.37, gdb 12.1) in relation to the previous version of Fedora
asdf install of erlang and elixir and compile circuits.uart is working perfectly on Fedora 37
Gr. Antonie
from circuits_uart.
Related Issues (20)
- Bad Match in `find_pids/0`
- Possible option to set timeout on Open ? HOT 2
- Circuits.UART.enumerate no work on Ubuntu 20.04 HOT 3
- Connection opens without errors, but I can't neither read or write HOT 2
- Circuits.UART.enumerate returns nothing %{"ttyAMA0" => %{}, "ttyS0" => %{}} HOT 9
- Fix kIOMasterPortDefault deprecation on macOS 12 and later
- Should we monitor/link to the `controlling_process`? HOT 1
- Error compiling with BeagleBone based target HOT 7
- `:enotty` when attempting to open a port with RS485 options on Linux HOT 1
- HOWTO: connect to 2 or more Serial Ports at the same time HOT 2
- Cannot compile for windows (have the windows driver SDK and mingw installed with chocolatey
- Latency HOT 3
- Can't close connection to unopened device HOT 1
- Cannot set parity to :mark HOT 2
- ENOTTY error setting custom speed on linux HOT 4
- UART.read timeout clarifications HOT 3
- Mingw 10.2 compilation is failing HOT 2
- [Question] Is it possible to read a specific but dynamic amount of bytes? HOT 3
- Issues with Fona 808 on Raspberry Pi Zero W HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from circuits_uart.