Bug #266
closedBuild failure with git commit 61eb11a: configure.ac:639: error: required file 'data/drivers/win32/cyberjack_ctapi/Makefile.in' not found
Added by rhabacker over 3 years ago. Updated 2 months ago.
Description
Building libchipcard on obs for Windows fails with the following error:
[ 147s] configure.ac:639: error: required file 'data/drivers/win32/cyberjack_ctapi/Makefile.in' not found
[ 147s] data/drivers/win32/Makefile.am:1: error: required directory data/drivers/win32/cyberjack_ctapi does not exist
[ 148s] src/ct/chiptanusb/Makefile.am: installing './depcomp'
Files
| _log.txt (42.5 KB) _log.txt | rhabacker, 08/11/2022 08:28 AM | ||
| 0001-Fix-building-on-Windows.patch (1.14 KB) 0001-Fix-building-on-Windows.patch | rhabacker, 08/11/2022 09:33 AM | ||
| libchipcard-5.99.1beta-fix-building-on-windows.patch (752 Bytes) libchipcard-5.99.1beta-fix-building-on-windows.patch | rhabacker, 10/11/2022 01:33 PM |
Updated by rhabacker over 3 years ago
~/src/libchipcard/data/drivers/win32> ls 0BUILD cyberjack_pcsc generic_pcsc Makefile.am ~/src/libchipcard/data/drivers/win32> cat Makefile.am SUBDIRS=\ generic_pcsc \ cyberjack_ctapi
Makefile.am points to the wrong directory
Updated by rhabacker over 3 years ago
Patch for this issue.
Updated by rhabacker over 3 years ago
There are additional build errors:
[ 106s] libtool: compile: i686-w64-mingw32-gcc -DHAVE_CONFIG_H -DBUILDING_CHIPCARD -DLC_CLIENT_XML_DIR=\"share/chipcard\" -DLC_CLIENT_LOCALE_DIR=\"share/locale\" -I. -I../../.. -I/usr/i686-w64-mingw32/sys-root/mingw/include/gwenhywfar5 -I../../.. -I../../.. -I../../../src -I../../../src -O2 -g -pipe -Wall -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -MT client_xml.lo -MD -MP -MF .deps/client_xml.Tpo -c client_xml.c -DDLL_EXPORT -DPIC -o .libs/client_xml.o [ 106s] In file included from ../../../src/libchipcard/base/client.h:50, [ 106s] from client_l.h:14, [ 106s] from client_p.h:14, [ 106s] from client.c:14: [ 106s] ../../../src/libchipcard/base/card.h:33:10: fatal error: libchipcard/base/pininfo.h: No such file or directory [ 106s] 33 | #include <libchipcard/base/pininfo.h> [ 106s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 106s] compilation terminated.
Updated by rhabacker over 3 years ago
It turned out that this is caused by missing call to
make typedefs types
before the main call to make as described in the readme.
Would it be possible to add those targets to the default target ?
Updated by rhabacker over 3 years ago
... but at least the latter target is not present
[ 108s] make: *** No rule to make target 'types'. Stop. [ 108s] error: Bad exit status from /var/tmp/rpm-tmp.hJQNWl (%build) [ 108s]
Updated by rhabacker over 3 years ago
make ... types
before the main call to make as described in the readme.
In the readme the mentioned target is wrong - it is named 'typefiles'
Updated by rhabacker over 3 years ago
There are additional build failures:
[ 112s] card.c:588:5: error: conflicting types for '_cardOpen'; have 'int(LC_CARD *)' [ 112s] 588 | int _cardOpen(LC_CARD *card) [ 112s] | ^~~~~~~~~ [ 112s] card.c:108:24: note: previous declaration of '_cardOpen' with type 'int(LC_CARD *)' [ 112s] 108 | static int CHIPCARD_CB _cardOpen(LC_CARD *card); [ 112s] | ^~~~~~~~~ [ 112s] card.c:595:5: error: conflicting types for '_cardClose'; have 'int(LC_CARD *)' [ 112s] 595 | int _cardClose(LC_CARD *card) [ 112s] | ^~~~~~~~~~ [ 112s] card.c:109:24: note: previous declaration of '_cardClose' with type 'int(LC_CARD *)' [ 112s] 109 | static int CHIPCARD_CB _cardClose(LC_CARD *card); [ 112s] | ^~~~~~~~~~ [ 112s] card.c:108:24: warning: '_cardOpen' used but never defined [ 112s] 108 | static int CHIPCARD_CB _cardOpen(LC_CARD *card); [ 112s] | ^~~~~~~~~ [ 112s] card.c:109:24: warning: '_cardClose' used but never defined [ 112s] 109 | static int CHIPCARD_CB _cardClose(LC_CARD *card); [ 112s] | ^~~~~~~~~~ [ 112s] client_io.c: In function '_connectCard': [ 112s] client_io.c:508:14: error: 'MAX_ATR_SIZE' undeclared (first use in this function); did you mean 'MAX_SID_SIZE'? [ 112s] 508 | BYTE pbAtr[MAX_ATR_SIZE]; [ 112s] | ^~~~~~~~~~~~ [ 112s] | MAX_SID_SIZE [ 112s] client_io.c:508:14: note: each undeclared identifier is reported only once for each function it appears in [ 112s] client_io.c:508:8: warning: unused variable 'pbAtr' [-Wunused-variable] [ 112s] 508 | BYTE pbAtr[MAX_ATR_SIZE]; [ 112s] | ^~~~~ [ 112s] make[4]: *** [Makefile:520: card.lo] Error 1
Updated by martin over 3 years ago
We should not add "make typefiles" etc to main targets because those are - like in AqBanking - only needed when compiling from git which only developers should do.
The files created by "make typefiles" should be in the tarball, so there should be no need to create those files.
Updated by rhabacker over 3 years ago
- File libchipcard-5.99.1beta-fix-building-on-windows.patch added
The appended patch is required to fix building issues mentioned at > https://www.aquamaniac.de/rdm/issues/266#note-7.
Updated by martin over 3 years ago
Hmm, why is that last patch necessary? In the same file in line 108 and 109 we have forward declarations which include the qualifier "CHIPCARD_CB". Shouldn't that be enough?
Regards
Martin
Updated by rhabacker over 3 years ago
- File libchipcard-5.99.1beta-fix-building-on-windows.patch added
I checked and it was redundant like you said. The updated patch no longer contains the part.
Updated by rhabacker over 3 years ago
- File deleted (
libchipcard-5.99.1beta-fix-building-on-windows.patch)
Updated by rhabacker over 3 years ago
For Windows 64bit the removed hunk is not needed, but for Windows 32bit it is:
[ 79s] libtool: compile: i686-w64-mingw32-gcc -DHAVE_CONFIG_H -DBUILDING_CHIPCARD -DLC_CLIENT_XML_DIR=\"share/chipcard\" -DLC_CLIENT_LOCALE_DIR=\"share/locale\" -I. -I../../.. -I/usr/i686-w64-mingw32/sys-root/mingw/include/gwenhywfar5 -I../../.. -I../../.. -I../../../src -I../../../src -O2 -g -pipe -Wall -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -MT client.lo -MD -MP -MF .deps/client.Tpo -c client.c -DDLL_EXPORT -DPIC -o .libs/client.o
[ 79s] card.c:585:5: error: conflicting types for '_cardOpen'; have 'int(LC_CARD )'
[ 79s] 585 | int _cardOpen(LC_CARD *card)
[ 79s] | ^~~~~~~
[ 79s] card.c:105:24: note: previous declaration of '_cardOpen' with type 'int(LC_CARD *)'
[ 79s] 105 | static int CHIPCARD_CB _cardOpen(LC_CARD *card);
[ 79s] | ^~~~~~~
[ 79s] card.c:592:5: error: conflicting types for '_cardClose'; have 'int(LC_CARD *)'
[ 79s] 592 | int _cardClose(LC_CARD *card)
[ 79s] | ^~~~~~~~
[ 79s] card.c:106:24: note: previous declaration of '_cardClose' with type 'int(LC_CARD *)'
[ 79s] 106 | static int CHIPCARD_CB _cardClose(LC_CARD *card);
[ 79s] | ^~~~~~~~
[ 79s] card.c:105:24: warning: '_cardOpen' used but never defined
[ 79s] 105 | static int CHIPCARD_CB _cardOpen(LC_CARD *card);
[ 79s] | ^~~~~~~
[ 79s] card.c:106:24: warning: '_cardClose' used but never defined
[ 79s] 106 | static int CHIPCARD_CB _cardClose(LC_CARD *card);
[ 79s] | ^~~~~~~~
[ 79s] make4: ** [Makefile:520: card.lo] Error 1
Updated by rhabacker over 3 years ago
- File libchipcard-5.99.1beta-fix-building-on-windows.patch libchipcard-5.99.1beta-fix-building-on-windows.patch added
Readded initial patch, which is required for i686-w64-mingw32-gcc version 12.
Updated by rhabacker over 3 years ago
- File deleted (
libchipcard-5.99.1beta-fix-building-on-windows.patch)