Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wireless123 opened this issue Jan 8, 2023 · 2 comments

Comments

@wireless123
Copy link

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 to loadWPiExtension'
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
Copy link

xMadNet commented Feb 26, 2023

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
Copy link

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 ;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants