Package: encfs
Version: 1.7.4-4
Tags: sid patch
Severity: important
User: debian-mips-dev-disc...@lists.alioth.debian.org
Usertags: mips-patch




Package encfs FTBFS for mips and mipsel with an error:

> /bin/bash ../libtool --tag=CXX   --mode=link g++ -DRLOG_COMPONENT="encfs" 
> -I/usr/include  -DLOCALEDIR=\"/usr/share/locale\" -W -Wall -Wpointer-arith 
> -Wwrite-strings -g -O2 -Wformat -Werror=format-security -flto -flto -pthread  
> -version-info 6:1:0 -Wl,-z,relro -Wl,-z,now -flto -flto   -o libencfs.la 
> -rpath /usr/lib readpassphrase.lo base64.lo ConfigReader.lo ConfigVar.lo 
> Context.lo Cipher.lo CipherKey.lo FileIO.lo RawFileIO.lo BlockFileIO.lo 
> CipherFileIO.lo MACFileIO.lo NameIO.lo StreamNameIO.lo BlockNameIO.lo 
> NullNameIO.lo Interface.lo MemoryPool.lo NullCipher.lo DirNode.lo FileNode.lo 
> FileUtils.lo openssl.lo autosprintf.lo SSL_Cipher.lo -lrlog -lssl -lcrypto 
> -lboost_serialization -lboost_filesystem -lboost_system 
> libtool: link: g++ -shared -nostdlib 
> /usr/lib/gcc/mipsel-linux-gnu/4.9/../../../mipsel-linux-gnu/crti.o 
> /usr/lib/gcc/mipsel-linux-gnu/4.9/crtbeginS.o  .libs/readpassphrase.o 
> .libs/base64.o .libs/ConfigReader.o .libs/ConfigVar.o .libs/Context.o 
> .libs/Cipher.o .libs/CipherKey.o .libs/FileIO.o .libs/RawFileIO.o 
> .libs/BlockFileIO.o .libs/CipherFileIO.o .libs/MACFileIO.o .libs/NameIO.o 
> .libs/StreamNameIO.o .libs/BlockNameIO.o .libs/NullNameIO.o .libs/Interface.o 
> .libs/MemoryPool.o .libs/NullCipher.o .libs/DirNode.o .libs/FileNode.o 
> .libs/FileUtils.o .libs/openssl.o .libs/autosprintf.o .libs/SSL_Cipher.o   
> /usr/lib/librlog.so -lssl -lcrypto -lboost_serialization -lboost_filesystem 
> -lboost_system -L/usr/lib/gcc/mipsel-linux-gnu/4.9 
> -L/usr/lib/gcc/mipsel-linux-gnu/4.9/../../../mipsel-linux-gnu 
> -L/usr/lib/gcc/mipsel-linux-gnu/4.9/../../../../lib -L/lib/mipsel-linux-gnu 
> -L/lib/../lib -L/usr/lib/mipsel-linux-gnu -L/usr/lib/../lib 
> -L/usr/lib/gcc/mipsel-linux-gnu/4.9/../../.. -lstdc++ -lm -lc -lgcc_s 
> /usr/lib/gcc/mipsel-linux-gnu/4.9/crtendS.o 
> /usr/lib/gcc/mipsel-linux-gnu/4.9/../../../mipsel-linux-gnu/crtn.o  -pthread 
> -Wl,-z -Wl,relro -Wl,-z -Wl,now   -pthread -Wl,-soname -Wl,libencfs.so.6 -o 
> .libs/libencfs.so.6.0.1
> /usr/bin/ld: /tmp/cck84z9f.ltrans0.ltrans.o: relocation R_MIPS_HI16 against 
> `__gnu_local_gp' can not be used when making a shared object; recompile with 
> -fPIC
> /tmp/cck84z9f.ltrans0.ltrans.o: error adding symbols: Bad value
> collect2: error: ld returned 1 exit status


The reason for this error is the fact that fPIC flag is used for compiling but
not for linking.

Patch that adds fPIC flag for linking is attached.


Whit this patch I was able to successfully build encfs
for mips, mipsel and amd64.


Could you please consider including this patch?



Best Regards,
Dejan

diff -uNr encfs-1.7.4.orig/configure encfs-1.7.4/configure
--- encfs-1.7.4.orig/configure	2010-11-18 08:11:06.000000000 +0000
+++ encfs-1.7.4/configure	2014-10-14 12:06:32.000000000 +0000
@@ -13584,8 +13584,8 @@
       # Check if GNU C++ uses GNU ld as the underlying linker, since the
       # archiving commands below assume that GNU ld is being used.
       if test "$with_gnu_ld" = yes; then
-        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
         export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
diff -uNr encfs-1.7.4.orig/m4/libtool.m4 encfs-1.7.4/m4/libtool.m4
--- encfs-1.7.4.orig/m4/libtool.m4	2010-06-17 06:31:30.000000000 +0000
+++ encfs-1.7.4/m4/libtool.m4	2014-10-14 12:05:52.000000000 +0000
@@ -5523,8 +5523,8 @@
       # Check if GNU C++ uses GNU ld as the underlying linker, since the
       # archiving commands below assume that GNU ld is being used.
       if test "$with_gnu_ld" = yes; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'

Reply via email to