Wind River Support Network

HomeDefectsLIN8-3098
Fixed

LIN8-3098 : dosfstools GPLv2 fails to build

Created: Mar 21, 2016    Updated: Dec 3, 2018
Resolved Date: Apr 21, 2016
Found In Version: 8.0.0.0.LB12
Fix Version: 8.0.0.5
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: Userspace

Description

Dosfstools (v2.11 - GPLv2 ) fails to build with several errors like this:
...dosfstools-2.11/mkdosfs/mkdosfs.c:934: undefined reference to `cdiv

Workaround

--- mkdosfs/mkdosfs.c      2016-03-25 09:36:36.459568465 +0100
+++ mkdosfs/mkdosfs.c   2016-03-25 09:36:56.794467757 +0100
@@ -152,7 +152,7 @@

 /* Compute ceil(a/b) */

-inline int
+static inline int
 cdiv (int a, int b)
 {
   return (a + b - 1) / b;

Steps to Reproduce

1.
create a project like this:
/opt/wrlinux-8.0-rcpl/wrlinux-8/wrlinux/configure --enable-board=intel_x86-64 --enable-kernel=standard 
--enable-rootfs=glibc-core 
--enable-build=debug --with-license-blacklist=GPLv3,LGPLv3,GPLv3+,LGPLv3
2. 
make -C build dosfstools.addpkg, make

you will get these errors:
| make -C mkdosfs all
| make[1]: Entering directory './/bitbake_build/tmp/work/corei7-64-wrs-linux/dosfstools/2.11-r5/dosfstools-2.11/mkdosfs'
| x86_64-wrs-linux-gcc -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 --sysroot=.//bitbake_build/tmp/sysroots/intel-x86-64 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed mkdosfs.o -o mkdosfs
| mkdosfs.o: In function `setup_tables':
| .//bitbake_build/tmp/work/corei7-64-wrs-linux/dosfstools/2.11-r5/dosfstools-2.11/mkdosfs/mkdosfs.c:934: undefined reference to `cdiv'
| .//bitbake_build/tmp/work/corei7-64-wrs-linux/dosfstools/2.11-r5/dosfstools-2.11/mkdosfs/mkdosfs.c:954: undefined reference to `cdiv'
| .//bitbake_build/tmp/work/corei7-64-wrs-linux/dosfstools/2.11-r5/dosfstools-2.11/mkdosfs/mkdosfs.c:973: undefined reference to `cdiv'
| .//bitbake_build/tmp/work/corei7-64-wrs-linux/dosfstools/2.11-r5/dosfstools-2.11/mkdosfs/mkdosfs.c:1001: undefined reference to `cdiv'
| .//bitbake_build/tmp/work/corei7-64-wrs-linux/dosfstools/2.11-r5/dosfstools-2.11/mkdosfs/mkdosfs.c:1115: undefined reference to `cdiv'
| mkdosfs.o:.//bitbake_build/tmp/work/corei7-64-wrs-linux/dosfstools/2.11-r5/dosfstools-2.11/mkdosfs/mkdosfs.c:1123: more undefined references to `cdiv' follow
| collect2: error: ld returned 1 exit status
| Makefile:7: recipe for target 'mkdosfs' failed
| make[1]: *** [mkdosfs] Error 1
| make[1]: Leaving directory './/bitbake_build/tmp/work/corei7-64-wrs-linux/dosfstools/2.11-r5/dosfstools-2.11/mkdosfs'
| Makefile:21: recipe for target 'all' failed
| make: *** [all] Error 2
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (log file is located at .//bitbake_build/tmp/work/corei7-64-wrs-linux/dosfstools/2.11-r5/temp/do_compile/log.do_compile.32744)
ERROR: Task 1739 (.//layers/oe-core/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb, do_compile) failed with exit code '1'


Other Downloads


Live chat
Online