Re: Building with GCC on Ubuntu 18

From: Julio Maia (jmaia_at_ks.uiuc.edu)
Date: Thu Nov 08 2018 - 11:26:36 CST

We’ll look into it. Thanks for reporting that, Jerome.

Julio

> On Nov 8, 2018, at 11:18 AM, Jérôme Hénin <jerome.henin_at_ibpc.fr> wrote:
>
> Dear all,
>
> just an announcement to anyone who'd run into trouble building NAMD with GCC as shipped with recent Ubuntu distros. They enable PIE by default: https://wiki.ubuntu.com/SecurityTeam/PIE <https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.ubuntu.com_SecurityTeam_PIE&d=DwMFaQ&c=OCIEmEwdEq_aNlsP4fF3gFqSN-E3mlr2t9JcDdfOZag&r=jUfnSyKkfkyVRBIUzlG1GSGGZAZGcznwr8YliSSCjPc&m=fvL2HxXBc0Wm9o6bm9n18giKJj9NVVjzK9Hhr5h9tCg&s=ZIZpjLxaNPamXi49qEfd3tYsc1VcVChfhldG_UD1W1s&e=>
> which will break if you try to link NAMD with, say, a static FFTW that wasn't built with that option. Then you'll see errors like this:
> > relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
>
> This can be fixed by adding the option -no-pie to CXXOPTS in the relevant arch file (eg. Linux-x86_64-g++.arch).
>
> Jerome

This archive was generated by hypermail 2.1.6 : Mon Sep 16 2019 - 23:20:07 CDT