View Issue Details

IDProjectCategoryView StatusLast Update
0015170ScribusBuild Systempublic2019-06-04 20:56
Reportermapreri Assigned Tojghali  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.5.4.svn 
Target VersionFixed in Version1.5.4.svn 
Summary0015170: fails to build on arm64 on ubuntu 18.04
Descriptionscribus svn is failing to build on arm64 on ubuntu 18.04 with a linking error: https://launchpadlibrarian.net/357798271/buildlog_ubuntu-bionic-arm64.scribus-trunk_1.5.3svn~r22402~20180220~ppa71~ubuntu18.04.1_BUILDING.txt.gz

seems like something in the toolchain (gcc? ld?) is now stricter, and what has apparently always been a warning about an object not being compiled with -fPIC is now a fatal error.

The proposed patch looks like it Just Works™ for all of amd64/arm64/armhf/i386/ppc64el (and I consider it the correct solution anyway as changing -fPIC according to the host architecture strikes me as odd in this case).


Patch:

--- scribus-trunk-1.5.3svn~r22402~20180220~ppa71~ubuntu18.04.1/CMakeLists.txt 2018-02-20 21:01:55.000000000 +0100
+++ scribus-trunk-1.5.3svn~r22402~20180220~ppa71~ubuntu18.04.3/CMakeLists.txt 2018-02-22 11:06:56.000000000 +0100
@@ -159,9 +159,7 @@
 # http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3 and
 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559133
 
-if (ARCH_X86_64 EQUAL 1 OR ARCH_HPPA EQUAL 1 OR ARCH_MIPS EQUAL 1 OR ARCH_MIPS_64 EQUAL 1 OR ARCH_PPC_64 EQUAL 1)
- set(CMAKE_CXX_FLAGS_FPIC "-fPIC")
-endif()
+set(CMAKE_CXX_FLAGS_FPIC "-fPIC")
 
 ## Do our Apple OSX version setup
 if (APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND (ARCH_X86 EQUAL 1 OR ARCH_X86_64 EQUAL 1))
Tagspatch
PatchYes

Activities

jghali

2018-02-25 13:15

administrator   ~0044982

it seems there is a better way to do this:
https://stackoverflow.com/questions/38296756/what-is-the-idiomatic-way-in-cmake-to-add-the-fpic-compiler-option

mapreri

2018-02-25 13:52

reporter   ~0044983

Oh wow.
Didn't know of that, thank you!
Whatever, please make it just always use -fPIC instead of doing it only on few archs :)

jghali

2018-02-25 14:04

administrator   ~0044984

I didn't know it either ;)

jghali

2018-02-25 15:24

administrator   ~0044985

I'm currently doing a test build with this modification in Ubuntu 17.10. I will commit it if everything is ok.

jghali

2018-02-25 19:34

administrator   ~0044987

Change committed!

mapreri

2018-02-25 21:14

reporter   ~0044988

Thank you!

I confirm that now it builds everywhere again! :)

Issue History

Date Modified Username Field Change
2018-02-25 11:23 mapreri New Issue
2018-02-25 11:23 mapreri Tag Attached: patch
2018-02-25 13:15 jghali Note Added: 0044982
2018-02-25 13:52 mapreri Note Added: 0044983
2018-02-25 14:04 jghali Note Added: 0044984
2018-02-25 15:24 jghali Note Added: 0044985
2018-02-25 18:58 jghali Assigned To => jghali
2018-02-25 18:58 jghali Status new => resolved
2018-02-25 18:58 jghali Resolution open => fixed
2018-02-25 18:58 jghali Fixed in Version => 1.5.4.svn
2018-02-25 19:34 jghali Note Added: 0044987
2018-02-25 21:14 mapreri Note Added: 0044988
2019-06-04 20:56 cbradney Status resolved => closed