By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 2712

Summary: Build issue: kchmviewer FTBFS on opensuse ARM
Product: TDE Reporter: Francois Andriot <albator78>
Component: non-core programsAssignee: Slávek Banko <slavek.banko>
Status: RESOLVED FIXED    
Severity: normal CC: albator78, bugwatch, slavek.banko
Priority: P5    
Version: R14.1.x [Trinity]   
Hardware: Other   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Attachments: Patch from upstream chmlib

Description Francois Andriot 2016-10-09 16:07:17 CDT
kchmviewer builds fine on x86 and amd64 platforms, but not on arm.
Extract from build log:

[  193s] Good - your configure finished. Start make now
[  193s] 
[  193s] + /usr/bin/make -j3
[  193s] Making all in lib
[  193s] make[1]: Entering directory '/home/abuild/rpmbuild/BUILD/trinity-kchmviewer-14.1.0/lib'
[  193s] Making all in chmlib
[  193s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/trinity-kchmviewer-14.1.0/lib/chmlib'
[  193s] /bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -O2  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -g -I/usr/include/tqt -c -o chm_lib.lo chm_lib.c
[  193s] /bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -O2  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -g -I/usr/include/tqt -c -o lzx.lo lzx.c
[  193s] libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src -DQT_THREAD_SUPPORT -D_REENTRANT -DNDEBUG -O2 -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -g -I/usr/include/tqt -c chm_lib.c  -fPIC -DPIC -o .libs/chm_lib.o
[  193s] libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src -DQT_THREAD_SUPPORT -D_REENTRANT -DNDEBUG -O2 -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -g -I/usr/include/tqt -c lzx.c  -fPIC -DPIC -o .libs/lzx.o
[  193s] chm_lib.c:179:2: error: #error "Please define the sized types for your platform in chm_lib.c"
[  193s]  #error "Please define the sized types for your platform in chm_lib.c"
[  193s]   ^~~~~
[  193s] chm_lib.c:260:29: error: unknown type name 'Int32'
[  193s]                              Int32 *dest)
[  193s]                              ^~~~~
[  193s] chm_lib.c:272:30: error: unknown type name 'UInt32'
[  193s]                               UInt32 *dest)
[  193s]                               ^~~~~~
[  193s] chm_lib.c:284:29: error: unknown type name 'Int64'
[  193s]                              Int64 *dest)
[  193s]                              ^~~~~
[  193s] chm_lib.c:304:30: error: unknown type name 'UInt64'
[  193s]                               UInt64 *dest)
[  193s]                               ^~~~~~
[  193s] chm_lib.c:351:5: error: unknown type name 'Int32'
[  193s]      Int32       version;                /*  4 */
[  193s]      ^~~~~
[  193s] chm_lib.c:352:5: error: unknown type name 'Int32'
[  193s]      Int32       header_len;             /*  8 */
[  193s]      ^~~~~
[  193s] chm_lib.c:353:5: error: unknown type name 'Int32'
[  193s]      Int32       unknown_000c;           /*  c */
[  193s]      ^~~~~
[  193s] chm_lib.c:354:5: error: unknown type name 'UInt32'
[  193s]      UInt32      last_modified;          /* 10 */
[  193s]      ^~~~~~
[  193s] chm_lib.c:355:5: error: unknown type name 'UInt32'
[  193s]      UInt32      lang_id;                /* 14 */
[  193s]      ^~~~~~
[  193s] chm_lib.c:356:5: error: unknown type name 'UChar'
[  193s]      UChar       dir_uuid[16];           /* 18 */
[  193s]      ^~~~~
[  193s] chm_lib.c:357:5: error: unknown type name 'UChar'
[  193s]      UChar       stream_uuid[16];        /* 28 */
[  193s]      ^~~~~
[  193s] chm_lib.c:358:5: error: unknown type name 'UInt64'
[  193s]      UInt64      unknown_offset;         /* 38 */
[  193s]      ^~~~~~
[  193s] chm_lib.c:359:5: error: unknown type name 'UInt64'
[  193s]      UInt64      unknown_len;            /* 40 */
[  193s]      ^~~~~~
[  193s] chm_lib.c:360:5: error: unknown type name 'UInt64'
[  193s]      UInt64      dir_offset;             /* 48 */
[  193s]      ^~~~~~
[  193s] chm_lib.c:361:5: error: unknown type name 'UInt64'
[  193s]      UInt64      dir_len;                /* 50 */
[  193s]      ^~~~~~
[  193s] chm_lib.c:362:5: error: unknown type name 'UInt64'
[  193s]      UInt64      data_offset;            /* 58 (Not present before V3) */
[  193s]      ^~~~~~
[  193s] chm_lib.c: In function '_unmarshal_itsf_header':
[  193s] chm_lib.c:375:5: warning: implicit declaration of function '_unmarshal_int32' [-Wimplicit-function-declaration]
[  193s]      _unmarshal_int32     (pData, pDataLen, &dest->version);
[  193s]      ^~~~~~~~~~~~~~~~
[  193s] chm_lib.c:378:5: warning: implicit declaration of function '_unmarshal_uint32' [-Wimplicit-function-declaration]
[  193s]      _unmarshal_uint32    (pData, pDataLen, &dest->last_modified);
[  193s]      ^~~~~~~~~~~~~~~~~
[  193s] chm_lib.c:380:45: warning: passing argument 3 of '_unmarshal_uuid' from incompatible pointer type [-Wincompatible-pointer-types]
[  193s]      _unmarshal_uuid      (pData, pDataLen,  dest->dir_uuid);
[  193s]                                              ^~~~
[  193s] chm_lib.c:322:12: note: expected 'unsigned char *' but argument is of type 'int *'
[  193s]  static int _unmarshal_uuid(unsigned char **pData,
[  193s]             ^~~~~~~~~~~~~~~
[  193s] chm_lib.c:381:45: warning: passing argument 3 of '_unmarshal_uuid' from incompatible pointer type [-Wincompatible-pointer-types]
[  193s]      _unmarshal_uuid      (pData, pDataLen,  dest->stream_uuid);
[  193s]                                              ^~~~
[  193s] chm_lib.c:322:12: note: expected 'unsigned char *' but argument is of type 'int *'
[  193s]  static int _unmarshal_uuid(unsigned char **pData,
[  193s]             ^~~~~~~~~~~~~~~
[  193s] chm_lib.c:382:5: warning: implicit declaration of function '_unmarshal_uint64' [-Wimplicit-function-declaration]
[  193s]      _unmarshal_uint64    (pData, pDataLen, &dest->unknown_offset);
[  193s]      ^~~~~~~~~~~~~~~~~
[  193s] chm_lib.c: At top level:
[  193s] chm_lib.c:427:5: error: unknown type name 'Int32'
[  193s]      Int32       version;                /*  4 */
[  193s]      ^~~~~
[  193s] chm_lib.c:428:5: error: unknown type name 'Int32'
[  193s]      Int32       header_len;             /*  8 */
[  193s]      ^~~~~
[  193s] chm_lib.c:429:5: error: unknown type name 'Int32'
[  193s]      Int32       unknown_000c;           /*  c */
[  193s]      ^~~~~
[  193s] chm_lib.c:430:5: error: unknown type name 'UInt32'
[  193s]      UInt32      block_len;              /* 10 */
[  193s]      ^~~~~~
[  193s] chm_lib.c:431:5: error: unknown type name 'Int32'
[  193s]      Int32       blockidx_intvl;         /* 14 */
[  193s]      ^~~~~
[  193s] chm_lib.c:432:5: error: unknown type name 'Int32'
[  193s]      Int32       index_depth;            /* 18 */
[  193s]      ^~~~~
[  193s] chm_lib.c:433:5: error: unknown type name 'Int32'
[  193s]      Int32       index_root;             /* 1c */
[  193s]      ^~~~~
[  193s] chm_lib.c:434:5: error: unknown type name 'Int32'
[  193s]      Int32       index_head;             /* 20 */
[  193s]      ^~~~~
[  193s] chm_lib.c:435:5: error: unknown type name 'Int32'
[  193s]      Int32       unknown_0024;           /* 24 */
[  193s]      ^~~~~
[  193s] chm_lib.c:436:5: error: unknown type name 'UInt32'
[  193s]      UInt32      num_blocks;             /* 28 */
[  193s]      ^~~~~~
[  193s] chm_lib.c:437:5: error: unknown type name 'Int32'
[  193s]      Int32       unknown_002c;           /* 2c */
[  193s]      ^~~~~
[  193s] chm_lib.c:438:5: error: unknown type name 'UInt32'
[  193s]      UInt32      lang_id;                /* 30 */
[  193s]      ^~~~~~
[  193s] chm_lib.c:439:5: error: unknown type name 'UChar'
[  193s]      UChar       system_uuid[16];        /* 34 */
[  193s]      ^~~~~
[  193s] chm_lib.c:440:5: error: unknown type name 'UChar'
[  193s]      UChar       unknown_0044[16];       /* 44 */
[  193s]      ^~~~~
[  193s] chm_lib.c: In function '_unmarshal_itsp_header':
[  193s] chm_lib.c:465:45: warning: passing argument 3 of '_unmarshal_uuid' from incompatible pointer type [-Wincompatible-pointer-types]
[  193s]      _unmarshal_uuid      (pData, pDataLen,  dest->system_uuid);
[  193s]                                              ^~~~
[  193s] chm_lib.c:322:12: note: expected 'unsigned char *' but argument is of type 'int *'
[  193s]  static int _unmarshal_uuid(unsigned char **pData,
[  193s]             ^~~~~~~~~~~~~~~
[  193s] chm_lib.c:466:45: warning: passing argument 3 of '_unmarshal_uchar_array' from incompatible pointer type [-Wincompatible-pointer-types]
[  193s]      _unmarshal_uchar_array(pData, pDataLen, dest->unknown_0044, 16);
[  193s]                                              ^~~~
[  193s] chm_lib.c:219:12: note: expected 'unsigned char *' but argument is of type 'int *'
[  193s]  static int _unmarshal_uchar_array(unsigned char **pData,
[  193s]             ^~~~~~~~~~~~~~~~~~~~~~
[  193s] chm_lib.c: At top level:
[  193s] chm_lib.c:485:5: error: unknown type name 'UInt32'
[  193s]      UInt32      free_space;             /*  4 */
[  193s]      ^~~~~~
[  193s] chm_lib.c:486:5: error: unknown type name 'UInt32'
[  193s]      UInt32      unknown_0008;           /*  8 */
[  193s]      ^~~~~~
[  193s] chm_lib.c:487:5: error: unknown type name 'Int32'
[  193s]      Int32       block_prev;             /*  c */
[  193s]      ^~~~~
[  193s] chm_lib.c:488:5: error: unknown type name 'Int32'
[  193s]      Int32       block_next;             /* 10 */
[  193s]      ^~~~~
[  193s] chm_lib.c:519:5: error: unknown type name 'UInt32'
[  193s]      UInt32      free_space;             /*  4 */
[  193s]      ^~~~~~
[  193s] chm_lib.c:545:5: error: unknown type name 'UInt32'
[  193s]      UInt32      version;
[  193s]      ^~~~~~
[  193s] chm_lib.c:546:5: error: unknown type name 'UInt32'
[  193s]      UInt32      block_count;
[  193s]      ^~~~~~
[  193s] chm_lib.c:547:5: error: unknown type name 'UInt32'
[  193s]      UInt32      unknown;
[  193s]      ^~~~~~
[  193s] chm_lib.c:548:5: error: unknown type name 'UInt32'
[  193s]      UInt32      table_offset;
[  193s]      ^~~~~~
[  193s] chm_lib.c:549:5: error: unknown type name 'UInt64'
[  193s]      UInt64      uncompressed_len;
[  193s]      ^~~~~~
[  193s] chm_lib.c:550:5: error: unknown type name 'UInt64'
[  193s]      UInt64      compressed_len;
[  193s]      ^~~~~~
[  193s] chm_lib.c:551:5: error: unknown type name 'UInt64'
[  193s]      UInt64      block_len;
[  193s]      ^~~~~~
[  193s] chm_lib.c:583:5: error: unknown type name 'UInt32'
[  193s]      UInt32      size;                   /*  0        */
[  193s]      ^~~~~~
[  193s] chm_lib.c:585:5: error: unknown type name 'UInt32'
[  193s]      UInt32      version;                /*  8        */
[  193s]      ^~~~~~
[  193s] chm_lib.c:586:5: error: unknown type name 'UInt32'
[  193s]      UInt32      resetInterval;          /*  c        */
[  193s]      ^~~~~~
[  193s] chm_lib.c:587:5: error: unknown type name 'UInt32'
[  193s]      UInt32      windowSize;             /* 10        */
[  193s]      ^~~~~~
[  193s] chm_lib.c:588:5: error: unknown type name 'UInt32'
[  193s]      UInt32      windowsPerReset;        /* 14        */
[  193s]      ^~~~~~
[  193s] chm_lib.c:589:5: error: unknown type name 'UInt32'
[  193s]      UInt32      unknown_18;             /* 18        */
[  193s]      ^~~~~~
[  193s] chm_lib.c:655:5: error: unknown type name 'UInt64'
[  193s]      UInt64              dir_offset;
[  193s]      ^~~~~~
[  193s] chm_lib.c:656:5: error: unknown type name 'UInt64'
[  193s]      UInt64              dir_len;
[  193s]      ^~~~~~
[  193s] chm_lib.c:657:5: error: unknown type name 'UInt64'
[  193s]      UInt64              data_offset;
[  193s]      ^~~~~~
[  193s] chm_lib.c:658:5: error: unknown type name 'Int32'
[  193s]      Int32               index_root;
[  193s]      ^~~~~
[  193s] chm_lib.c:659:5: error: unknown type name 'Int32'
[  193s]      Int32               index_head;
[  193s]      ^~~~~
[  193s] chm_lib.c:660:5: error: unknown type name 'UInt32'
[  193s]      UInt32              block_len;
[  193s]      ^~~~~~
[  193s] chm_lib.c:662:5: error: unknown type name 'UInt64'
[  193s]      UInt64              span;
[  193s]      ^~~~~~
[  193s] chm_lib.c:669:5: error: unknown type name 'UInt32'
[  193s]      UInt32              window_size;
[  193s]      ^~~~~~
[  193s] chm_lib.c:670:5: error: unknown type name 'UInt32'
[  193s]      UInt32              reset_interval;
[  193s]      ^~~~~~
[  193s] chm_lib.c:671:5: error: unknown type name 'UInt32'
[  193s]      UInt32              reset_blkcount;
[  193s]      ^~~~~~

And so on ... many identical messages...
Comment 1 Slávek Banko 2016-10-09 18:34:08 CDT
Created attachment 2724 [details]
Patch from upstream chmlib

Please, you can test the attached patch? It comes from upstream chmlib repository. On Debian and Ubuntu is used the system libchm and therefore built-in library is not used.
Comment 2 Francois Andriot 2016-10-10 14:37:02 CDT
Hello, thanks for your reply.
I did not know that there was a system-provided chmlib, so for now, I've just added the dependency to the package and rebuilding.
If this works then the patch won't be needed.
Comment 3 Francois Andriot 2016-10-11 11:48:09 CDT
Hello, problem solved by using system provided chmlib.
The patch is not needed in our git.
Comment 4 Slávek Banko 2016-10-11 12:04:29 CDT
(In reply to Francois Andriot from comment #3)
> Hello, problem solved by using system provided chmlib.
> The patch is not needed in our git.

The question is whether it would be appropriate to remove the built-in libchm and change configuration script to require libchm in system?
Comment 5 Francois Andriot 2016-10-11 14:00:04 CDT
Yes, I think removing the bundled chmlib is probably the right thing to do, since the upstream library is available on almost all distributions.