epics-modules / dxp

EPICS support for digital x-ray spectroscopy electronics from X-ray Instrumentation Associates (XIA)
2 stars 3 forks source link

Doesn't compile on Raspbian #5

Closed devilkingsatan666 closed 3 years ago

devilkingsatan666 commented 3 years ago

Dear all, I was compiling synApps on Raspbian GNU/Linux 10 (buster) armv7l with GCC 8.3.0 against EPICS-7.0.5. When compiling dxp I got the error as following.

/usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DUNIX -Dlinux -O3 -Wall -Werror-implicit-function-declaration -DEXCLUDE_XUP -DEXCLUDE_SERIAL -DEXCLUDE_VEGA -DEXCLUDE_UDXPS -DEXCLUDE_XMAP -DEXCLUDE_PLX -DLINUX -Wno-unused-but-set-variable -D_FILE_OFFSET_BITS=64 -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/opt/epics/R70.5/synApps/support/seq-2-2-8/include -I/opt/epics/R70.5/synApps/support/mca-R7-9/include/os/Linux -I/opt/epics/R70.5/synApps/support/mca-R7-9/include -I/opt/epics/R70.5/synApps/support/dxp-master/include -I/opt/epics/R70.5/synApps/support/asyn-R4-41/include -I/opt/epics/R70.5/synApps/support/areaDetector-master/ADSupport/include/os/Linux -I/opt/epics/R70.5/synApps/support/areaDetector-master/ADSupport/include -I/opt/epics/R70.5/synApps/support/areaDetector-master/ADCore/include -I/opt/epics/R70.5/synApps/support/autosave-R5-10-2/include/os/Linux -I/opt/epics/R70.5/synApps/support/autosave-R5-10-2/include -I/opt/epics/R70.5/synApps/support/busy-R1-7-3/include -I/opt/epics/R70.5/synApps/support/calc-R3-7-4/include -I/opt/epics/R70.5/synApps/support/sscan-master/include -I/opt/epics/R70.5/synApps/support/iocStats-3-1-16/include/os/Linux -I/opt/epics/R70.5/synApps/support/iocStats-3-1-16/include -I/opt/epics/R70.5/epics-base/include/compiler/gcc -I/opt/epics/R70.5/epics-base/include/os/Linux -I/opt/epics/R70.5/epics-base/include -c ../xia_epp_linux.c ../xia_epp_linux.c: In function ‘DlPortWritePortUchar’: ../xia_epp_linux.c:486:5: error: implicit declaration of function ‘outb_p’; did you mean ‘outb’? [-Werror=implicit-function-declaration] outb_p((int)databyte, (unsigned short int)port); ^~ outb ../xia_epp_linux.c: In function ‘DlPortReadPortUchar’: ../xia_epp_linux.c:507:13: error: implicit declaration of function ‘inb_p’; did you mean ‘inb’? [-Werror=implicit-function-declaration] value = inb_p((unsigned short int)port); ^~~~~ inb ../xia_epp_linux.c: In function ‘DlPortReadPortBufferUshort’: ../xia_epp_linux.c:530:21: error: implicit declaration of function ‘inw_p’; did you mean ‘inw’? [-Werror=implicit-function-declaration] buffer[i] = inw_p((unsigned short int)port); ^~~~~ inw ../xia_epp_linux.c: In function ‘DlPortReadPortBufferUlong’: ../xia_epp_linux.c:552:21: error: implicit declaration of function ‘inl_p’; did you mean ‘inl’? [-Werror=implicit-function-declaration] buffer[i] = inl_p((unsigned short int)port); ^~~~~ inl ../xia_epp_linux.c: In function ‘DlPortWritePortBufferUshort’: ../xia_epp_linux.c:574:9: error: implicit declaration of function ‘outw_p’; did you mean ‘outw’? [-Werror=implicit-function-declaration] outw_p(buffer[i], (unsigned short int)port); ^~ outw cc1: some warnings being treated as errors make[4]: [/opt/epics/R70.5/epics-base/configure/RULES_BUILD:259: xia_epp_linux.o] Error 1 make[4]: Leaving directory '/opt/epics/R70.5/synApps/support/dxp-master/dxpApp/handelSrc/O.linux-arm' make[3]: [/opt/epics/R70.5/epics-base/configure/RULES_ARCHS:58: install.linux-arm] Error 2 make[3]: Leaving directory '/opt/epics/R70.5/synApps/support/dxp-master/dxpApp/handelSrc' make[2]: [/opt/epics/R70.5/epics-base/configure/RULES_DIRS:85: handelSrc.install] Error 2 make[2]: Leaving directory '/opt/epics/R70.5/synApps/support/dxp-master/dxpApp' make[1]: [/opt/epics/R70.5/epics-base/configure/RULES_DIRS:85: dxpApp.install] Error 2 make[1]: Leaving directory '/opt/epics/R70.5/synApps/support/dxp-master' make: *** [/opt/epics/R70.5/epics-base/configure/RULES_DIRS:85: /opt/epics/R70.5/synApps/support/dxp-master.install] Error 2

MarkRivers commented 3 years ago

The code that is failing is for the Extended Parallel Port (EPP) which is used to communicate with very old models of the Saturn. EPP ports are no longer present on modern PCs. You should be able to avoid this warning by changing this line

USR_CFLAGS_Linux += -DEXCLUDE_XMAP -DEXCLUDE_PLX -DLINUX

to this:

USR_CFLAGS_Linux += -DEXCLUDE_XMAP -DEXCLUDE_EPP -DEXCLUDE_PLX -DLINUX
devilkingsatan666 commented 3 years ago

Thank you for your reply. After replacing the line in the Makefile under the directory dxp-master/dxpApp/handelSrc

USR_CFLAGS_Linux += -DEXCLUDE_XMAP -DEXCLUDE_PLX -DLINUX

with the line as you suggested

USR_CFLAGS_Linux += -DEXCLUDE_XMAP -DEXCLUDE_EPP -DEXCLUDE_PLX -DLINUX

The same errors are still there as following.

/usr/bin/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DUNIX -Dlinux -O3 -Wall -Werror-implicit-function-declaration -DEXCLUDE_XUP -DEXCLUDE_SERIAL -DEXCLUDE_VEGA -DEXCLUDE_UDXPS -DEXCLUDE_XMAP -DEXCLUDE_EPP -DEXCLUDE_PLX -DLINUX -Wno-unused-but-set-variable -D_FILE_OFFSET_BITS=64 -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/opt/epics/R70.5/synApps/support/seq-2-2-8/include -I/opt/epics/R70.5/synApps/support/mca-R7-9/include/os/Linux -I/opt/epics/R70.5/synApps/support/mca-R7-9/include -I/opt/epics/R70.5/synApps/support/dxp-master/include -I/opt/epics/R70.5/synApps/support/asyn-R4-41/include -I/opt/epics/R70.5/synApps/support/areaDetector-master/ADSupport/include/os/Linux -I/opt/epics/R70.5/synApps/support/areaDetector-master/ADSupport/include -I/opt/epics/R70.5/synApps/support/areaDetector-master/ADCore/include -I/opt/epics/R70.5/synApps/support/autosave-R5-10-2/include/os/Linux -I/opt/epics/R70.5/synApps/support/autosave-R5-10-2/include -I/opt/epics/R70.5/synApps/support/busy-R1-7-3/include -I/opt/epics/R70.5/synApps/support/calc-R3-7-4/include -I/opt/epics/R70.5/synApps/support/sscan-master/include -I/opt/epics/R70.5/synApps/support/iocStats-3-1-16/include/os/Linux -I/opt/epics/R70.5/synApps/support/iocStats-3-1-16/include -I/opt/epics/R70.5/epics-base/include/compiler/gcc -I/opt/epics/R70.5/epics-base/include/os/Linux -I/opt/epics/R70.5/epics-base/include -c ../xia_epp_linux.c ../xia_epp_linux.c: In function ‘DlPortWritePortUchar’: ../xia_epp_linux.c:486:5: error: implicit declaration of function ‘outb_p’; did you mean ‘outb’? [-Werror=implicit-function-declaration] outb_p((int)databyte, (unsigned short int)port); ^~ outb ../xia_epp_linux.c: In function ‘DlPortReadPortUchar’: ../xia_epp_linux.c:507:13: error: implicit declaration of function ‘inb_p’; did you mean ‘inb’? [-Werror=implicit-function-declaration] value = inb_p((unsigned short int)port); ^~~~~ inb ../xia_epp_linux.c: In function ‘DlPortReadPortBufferUshort’: ../xia_epp_linux.c:530:21: error: implicit declaration of function ‘inw_p’; did you mean ‘inw’? [-Werror=implicit-function-declaration] buffer[i] = inw_p((unsigned short int)port); ^~~~~ inw ../xia_epp_linux.c: In function ‘DlPortReadPortBufferUlong’: ../xia_epp_linux.c:552:21: error: implicit declaration of function ‘inl_p’; did you mean ‘inl’? [-Werror=implicit-function-declaration] buffer[i] = inl_p((unsigned short int)port); ^~~~~ inl ../xia_epp_linux.c: In function ‘DlPortWritePortBufferUshort’: ../xia_epp_linux.c:574:9: error: implicit declaration of function ‘outw_p’; did you mean ‘outw’? [-Werror=implicit-function-declaration] outw_p(buffer[i], (unsigned short int)port); ^~ outw cc1: some warnings being treated as errors make[4]: [/opt/epics/R70.5/epics-base/configure/RULES_BUILD:259: xia_epp_linux.o] Error 1 make[4]: Leaving directory '/opt/epics/R70.5/synApps/support/dxp-master/dxpApp/handelSrc/O.linux-arm' make[3]: [/opt/epics/R70.5/epics-base/configure/RULES_ARCHS:58: install.linux-arm] Error 2 make[3]: Leaving directory '/opt/epics/R70.5/synApps/support/dxp-master/dxpApp/handelSrc' make[2]: [/opt/epics/R70.5/epics-base/configure/RULES_DIRS:85: handelSrc.install] Error 2 make[2]: Leaving directory '/opt/epics/R70.5/synApps/support/dxp-master/dxpApp' make[1]: [/opt/epics/R70.5/epics-base/configure/RULES_DIRS:85: dxpApp.install] Error 2 make[1]: Leaving directory '/opt/epics/R70.5/synApps/support/dxp-master' make: *** [/opt/epics/R70.5/epics-base/configure/RULES_DIRS:85: /opt/epics/R70.5/synApps/support/dxp-master.install] Error 2

MarkRivers commented 3 years ago

I realized you also need to change this line in the Makefile

handel_SRCS_Linux += xia_epp_linux.c md_linux.c

to this:

handel_SRCS_Linux += md_linux.c
MarkRivers commented 3 years ago

Are you actually planning to use any XIA devices on the Raspbian system? If not you can just skip bulding dxp altogether on that arch.

devilkingsatan666 commented 3 years ago

Thank you for your reminds. As you said, I actually skipped it and successfully built the rest of the synchrotron Apps. However, as a user, I think it's my responsibility to report any kind of error. I will keep reporting the errors. I really appreciate your help.

devilkingsatan666 commented 3 years ago

After replacing the line in the Makefile under the directory dxp-master/dxpApp/handelSrc USR_CFLAGS_Linux += -DEXCLUDE_XMAP -DEXCLUDE_PLX -DLINUX with the line as following: USR_CFLAGS_Linux += -DEXCLUDE_XMAP -DEXCLUDE_EPP -DEXCLUDE_PLX -DLINUX and change the line handel_SRCS_Linux += xia_epp_linux.c md_linux.c as following: handel_SRCS_Linux += md_linux.c The package successfully built. Thank you so much for your time. Since the issue has been solved, I think it's time to close the issue.