JFFS2 on RTEMS4.11 and GR712RC Eval Kit, zlib issue

Chris Johns chrisj at rtems.org
Thu May 21 21:48:18 UTC 2015



On 22/05/2015 1:15 am, Sebastian Huber wrote:
> 
> ----- Sebastian Huber <sebastian.huber at embedded-brains.de> schrieb:
>>
>>
>> On 21/05/15 00:45, Chris Johns wrote:
>>>> make[1]: Leaving directory `/rtems4.11_test/src/app'
>>>>> sparc-rtems4.11-gcc --pipe
>>>>> -B/rtems4.11_test/build/toolchain/sparc-rtems4.11/leon3/lib/ -specs
>>>>> bsp_specs -qrtems   -Lapp -lapp -o build/cassis.elf app/init.o -Lapp -lapp
>>>>> /rtems4.11_test/build/toolchain/sparc-rtems4.11/leon3/lib/librtemscpu.a(libjffs2_a-compr_zlib.o):
>>>>> In function `rtems_jffs2_compressor_zlib_compress':
>>>>> /rtems4.11_test/rtems-source-builder/rtems/build/sparc-rtems4.11-kernel-4.11-1/sparc-rtems4.11-kernel-4.11-1-4.11/build/sparc-rtems4.11/c/leon3/cpukit/libfs/../../../../../../rtems-4.11/c/src/../../cpukit/libfs/src/jffs2/src/compr_zlib.c:61:
>>>>> undefined reference to `z_deflateInit_'
>>>>> /rtems4.11_test/rtems-source-builder/rtems/build/sparc-rtems4.11-kernel-4.11-1/sparc-rtems4.11-kernel-4.11-1-4.11/build/sparc-rtems4.11/c/leon3/cpukit/libfs/../../../../../../rtems-4.11/c/src/../../cpukit/libfs/src/jffs2/src/compr_zlib.c:78:
>>>>> undefined reference to `z_deflate'
>>>>> /rtems4.11_test/rtems-source-builder/rtems/build/sparc-rtems4.11-kernel-4.11-1/sparc-rtems4.11-kernel-4.11-1-4.11/build/sparc-rtems4.11/c/leon3/cpukit/libfs/../../../../../../rtems-4.11/c/src/../../cpukit/libfs/src/jffs2/src/compr_zlib.c:91:
>>>>> undefined reference to `z_deflate'
>>>>>
>>>>> .
>>>>>
>>>>> .
>>>>>
>>>>> .
>>>>>
>>>>> undefined reference to `z_inflateEnd'
>>>>> collect2: error: ld returned 1 exit status
>>>>> make: *** [build/cassis.elf] Error 1
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> zlib seems to be there:
>>>>>
>>> Have you added '-lz' to your list of libraries to link against ?
>>
>> The -lz is missing, but this alone will not work, see also:
>>
>> https://lists.rtems.org/pipermail/devel/2014-September/008191.html
>>
>> Its not the first time a user is hit by this problem.
>>
>> Use "--start-group -lrtemsbsp -lrtemscpu -lz -lc -lgcc --end-group" as a 
>> workaround until the RTEMS community is able to fix the problem.
> 
> An alternative to the GCC patch would be a separate libjffs2.a so that you can use -ljffs2 -lz.
> 

Or use zlib in your application so it is pulled in.

Chris



More information about the users mailing list