[PATCH] tar: Fix build error when CONFIG_UNCOMPRESS is not selected

Denys Vlasenko vda.linux at googlemail.com
Mon Jan 28 07:48:33 UTC 2013


On Monday 28 January 2013 00:17, Abdoulaye Walsimou GAYE wrote:
> On 01/28/2013 12:07 AM, Abdoulaye Walsimou GAYE wrote:
> > On 01/27/2013 11:48 PM, Denys Vlasenko wrote:
> >> On Saturday 26 January 2013 16:24, Abdoulaye Walsimou Gaye wrote:
> >>> Signed-off-by: Abdoulaye Walsimou Gaye <awg at embtoolkit.org>
> >>> ---
> >>>   archival/libarchive/Kbuild.src |    2 +-
> >>>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/archival/libarchive/Kbuild.src b/archival/libarchive/Kbuild.src
> >>> index 58457fc..87e1ab9 100644
> >>> --- a/archival/libarchive/Kbuild.src
> >>> +++ b/archival/libarchive/Kbuild.src
> >>> @@ -48,7 +48,7 @@ lib-$(CONFIG_DPKG_DEB)                  += $(DPKG_FILES)
> >>>   lib-$(CONFIG_GUNZIP)                    += open_transformer.o decompress_gunzip.o
> >>>   lib-$(CONFIG_RPM2CPIO)                  += decompress_gunzip.o get_header_cpio.o
> >>>   lib-$(CONFIG_RPM)                       += open_transformer.o decompress_gunzip.o get_header_cpio.o
> >>> -lib-$(CONFIG_TAR)                       += get_header_tar.o
> >>> +lib-$(CONFIG_TAR)                       += get_header_tar.o decompress_uncompress.o
> >>>   lib-$(CONFIG_UNCOMPRESS)                += decompress_uncompress.o
> >>>   lib-$(CONFIG_UNZIP)                     += decompress_gunzip.o
> >>>   lib-$(CONFIG_LZOP)                      += lzo1x_1.o lzo1x_1o.o lzo1x_d.o
> >>
> >> Please send me .config which fails to build...
> >
> 
> Hello,
> See attached .config file and see below the build link error,
> 
> /home/walsimou/embtoolkit.git/build/packages_build-mipsel-linux-mips32/busybox-1.20.2/archival/tar.c:1065: undefined reference to `unpack_Z_stream'
> /home/walsimou/embtoolkit.git/build/packages_build-mipsel-linux-mips32/busybox-1.20.2/archival/tar.c:1065: undefined reference to `unpack_Z_stream'
> /home/walsimou/embtoolkit.git/tools-mipsel-linux-mips32/bin/mipsisa32el-unknown-linux-uclibc-ld: busybox_unstripped: hidden symbol `unpack_Z_stream' isn't defined
> /home/walsimou/embtoolkit.git/tools-mipsel-linux-mips32/bin/mipsisa32el-unknown-linux-uclibc-ld: final link failed: Bad value
> mipsisa32el-unknown-linux-uclibc-clang: error: linker command failed with exit code 1 (use -v to see invocation)


I was able to build busybox-1.20.2 with this .config
without errors.

Looks like your compiler did not optimize this out:

                if (opt & OPT_COMPRESS)
                        USE_FOR_MMU(xformer = unpack_Z_stream;)
                        USE_FOR_NOMMU(xformer_prog = "uncompress";)


even though OPT_COMPRESS is a constant zero.
-- 
vda


More information about the busybox mailing list