TheNextLVL / wiringPi

UNOFICIAL WiringPi library for RPi 64bit OS
GNU Lesser General Public License v3.0
12 stars 3 forks source link

Error with: wpiExtensions.o - multiple definition of `comDat'; (Raspian 64bit - Raspberry Pi 400) #4

Open wireless123 opened 1 year ago

wireless123 commented 1 year ago

wiringPi Build script

WiringPi Library [UnInstall] make: Für das Ziel „all“ ist nichts zu tun. [Install Headers] [Install Dynamic Lib]

WiringPi Devices Library [UnInstall] make: Für das Ziel „all“ ist nichts zu tun. [Install Headers] [Install Dynamic Lib]

GPIO Utility [Link] /usr/bin/ld: gpio.o: in function main': gpio.c:(.text.startup+0x4b4): undefined reference toloadWPiExtension' collect2: error: ld returned 1 exit status make: *** [Makefile:55: gpio] Fehler 1

->Error with: wpiExtensions.c

/usr/bin/ld: wpiExtensions.o:(.bss+0x408): multiple definition of `comDat'; drcNet.o:(.bss+0x400): first defined here collect2: error: ld returned 1 exit status make: *** [Makefile:77: libwiringPi.so.2.50] Fehler 1

Error: wget https://github.com/TheNextLVL/wiringPi/releases/download/2.46/wiringpi-2.46.deb apt install ./wiringpi-2.46.deb

-> gpio version: 2.46 Copyright (c) 2012-2018 Gordon Henderson This is free software with ABSOLUTELY NO WARRANTY. For details type: gpio -warranty

Oops: Unable to determine board revision from /proc/cpuinfo -> Only Raspberry device is supported! -> You'd best google the error to find out why.

xMadNet commented 1 year ago

Hi, Same issue : Cant build...

Sun Feb 26 09:51:31 pi@Xpi4Test: ~/wiringPi $ uname -a Linux Xpi4Test 6.1.11-v8+ #1630 SMP PREEMPT Fri Feb 10 12:11:31 GMT 2023 aarch64 GNU/Linux

Sun Feb 26 09:51:19 pi@Xpi4Test: ~/wiringPi $ ./build wiringPi Build script

WiringPi Library [UnInstall] [Compile] wiringPi.c [Compile] wiringSerial.c [Compile] wiringShift.c [Compile] piHiPri.c [Compile] piThread.c [Compile] wiringPiSPI.c [Compile] wiringPiI2C.c wiringPi.c: In function ‘piBoardId’: wiringPi.c:1040:8: warning: unused variable ‘line’ [-Wunused-variable] 1040 | char line [120] ; | ^~~~ At top level: wiringPi.c:1420:21: warning: ‘digitalWrite8Dummy’ defined but not used [-Wunused-function] 1420 | static void digitalWrite8Dummy (UNU struct wiringPiNodeStruct node, UNU int pin, UNU int value) { return ; } | ^~~~~~ wiringPi.c:1419:21: warning: ‘digitalRead8Dummy’ defined but not used [-Wunused-function] 1419 | static unsigned int digitalRead8Dummy (UNU struct wiringPiNodeStruct node, UNU int UNU pin) { return 0 ; } | ^~~~~ [Compile] softPwm.c [Compile] softTone.c [Compile] mcp23008.c [Compile] mcp23016.c [Compile] mcp23017.c wiringPi.c: In function ‘piBoardId’: wiringPi.c:1135:7: warning: ‘c’ may be used uninitialized in this function [-Wmaybe-uninitialized] 1135 | printf ("piBoardId: Old Way: revision is: %s\n", c) ; | ^~~~~~~~~~~ [Compile] mcp23s08.c [Compile] mcp23s17.c [Compile] sr595.c [Compile] pcf8574.c [Compile] pcf8591.c [Compile] mcp3002.c [Compile] mcp3004.c [Compile] mcp4802.c [Compile] mcp3422.c [Compile] max31855.c [Compile] max5322.c [Compile] ads1115.c [Compile] sn3218.c [Compile] bmp180.c [Compile] htu21d.c [Compile] ds18b20.c [Compile] rht03.c [Compile] drcSerial.c [Compile] drcNet.c [Compile] pseudoPins.c [Compile] wpiExtensions.c pseudoPins.c: In function ‘myAnalogRead’: pseudoPins.c:50:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 50 | int ptr = (int )node->data0 ; | ^ pseudoPins.c: In function ‘myAnalogWrite’: pseudoPins.c:59:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 59 | int ptr = (int )node->data0 ; | ^ pseudoPins.c: In function ‘pseudoPinsSetup’: pseudoPins.c:89:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 89 | node->data0 = (unsigned int)ptr ; | ^ drcNet.c: In function ‘authenticate’: drcNet.c:112:24: warning: ‘%s’ directive writing up to 1023 bytes into a region of size 1021 [-Wformat-overflow=] 89 | return &buf [10] ; | ~~~~~ ...... 112 | sprintf (salted, "$6$%s$", challenge) ; | ^~ drcNet.c:112:3: note: ‘sprintf’ output between 5 and 1028 bytes into a destination of size 1024 112 | sprintf (salted, "$6$%s$", challenge) ; | ^~~~~~~~~ [Link (Dynamic)] /usr/bin/ld: wpiExtensions.o:(.bss+0x408): multiple definition of `comDat'; drcNet.o:(.bss+0x400): first defined here collect2: error: ld returned 1 exit status make: *** [Makefile:77: libwiringPi.so.2.50] Error 1

mcolvin1409 commented 1 year ago

Suggest removing the comDat declaration from the struct definition in file drcNetCmd.h

struct drcNetComStruct { uint32_t pin ; uint32_t cmd ; uint32_t data ; } ; //} comDat ;