bugdavfs2 - Bugs: bug #63395, relocation R_X86_64_32 against...

 
 

bug #63395: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC

Submitter:  andreas <anlognu>
Submitted:  Mon 21 Nov 2022 03:17:38 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 21 Nov 2022 03:17:38 PM UTC, original submission:  

for some reason I get linker error:

gcc -Wall -Werror=format-security -fstack-protector-strong --param=ssp-buffer-size=4 -g -O2 -I/usr/include/neon   -o mount.davfs cache.o dav_fuse.o kernel_interface.o mount_davfs.o webdav.o  -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -lneon 
/usr/bin/ld: cache.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: dav_fuse.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: kernel_interface.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: mount_davfs.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: webdav.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status


basically from a git checkout I did:
$ ./bootstrap
$ ./configure 
Configuration for building davfs2 1.7.0:

  Install Prefix:            /usr/local
  Compiler:                  gcc
  Large File Support:        no
  Neon Library:              library in /usr (0.30.2)
                             SSL is supported by neon
  Native Language Support:   libc
  Host                       linux-gnu
and then
$ make



following works for me ... is there another way to compile this on Linux?
do I miss something or do others  see the same issue?


--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -33,7 +33,7 @@ mount_davfs_SOURCES = cache.c \
 umount_davfs_SOURCES = umount_davfs.c defaults.h
 
 AM_CFLAGS = -Wall -Werror=format-security \
-            -fstack-protector --param=ssp-buffer-size=4
+            -fPIC -fstack-protector --param=ssp-buffer-size=4
 DEFS = -DPROGRAM_NAME=\"mount.davfs\" \
        -DDAV_SYS_CONF_DIR=\"$(pkgsysconfdir)\" \
        -DDAV_LOCALSTATE_DIR=\"$(dav_localstatedir)\" \

andreas <anlognu>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by anlognu (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code