orangepi-xunlong / wiringOP-Python

GNU Lesser General Public License v3.0
62 stars 33 forks source link

doesn't compile in Orange Pi 5 plus #17

Open Seb0042 opened 10 months ago

Seb0042 commented 10 months ago

Hi, I know this board is not supported yet, but when I try to compile/install it, I have a strange error message without informations:

make
python3 generate-bindings.py > bindings.i
python3 setup.py build
cat /etc/orangepi-release
cat /etc/armbian-release
running build
running build_py
running build_ext
building '_wiringpi' extension
swigging wiringpi.i to wiringpi_wrap.c
swig -python -threads -o wiringpi_wrap.c wiringpi.i
aarch64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -IwiringOP -IwiringOP/wiringPi -IwiringOP/devLib -I/root/tools/include -I/usr/include/python3.10 -c fixUndefFunc.c -o build/temp.linux-aarch64-3.10/fixUndefFunc.o -DCONFIG_ORANGEPI
aarch64-linux-gnu-gcc: warning: : linker input file unused because linking not done
aarch64-linux-gnu-gcc: error: : linker input file not found: No such file or directory
error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
make: *** [Makefile:2: all] Error 1

I'm confuse because the last gcc line is ok and the object is compiled (build/temp.linux-aarch64-3.10/fixUndefFunc.o) So what is the missing file ?

zivdar001matin commented 7 months ago

I've ran into the same problem, then I could build using these steps (idk if all of these are necessary):

  1. Switch to origin/next branch
    git switch next
  2. Manually clone latest wiringOP (for me was ce520ea)
  3. Replace wiringOP folder (which currently is 0a72849) with the cloned latest version.
  4. Build it as before and you won't get errors! :)
mcer12 commented 5 months ago

@zivdar001matin @Seb0042 I encountered the same issue, what worked for me was simply use the "next" branch so the git clone should now look like this: git clone --recursive https://github.com/orangepi-xunlong/wiringOP-Python.git -b next No other change to the procedure was required and it compiles fine.