RE: Building with GCC on Ubuntu 18

From: Vermaas, Joshua (Joshua.Vermaas_at_nrel.gov)
Date: Thu Nov 08 2018 - 11:50:54 CST

The other option is to use dynamically loaded fftw and tcl. On ubuntu, I think the relevant packages are "fftw-dev" or "libfftw3-dev" and either "tcl8.5-dev" or "tcl8.6-dev", which put things where the default Makefile expects to find them.

-Josh

On 2018-11-08 10:29:37-07:00 owner-namd-l_at_ks.uiuc.edu wrote:

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<mailto: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/PIEfnSyKkfkyVRBIUzlG1GSGGZAZGcznwr8YliSSCjPc%26m%3DfvL2HxXBc0Wm9o6bm9n18giKJj9NVVjzK9Hhr5h9tCg%26s%3DZIZpjLxaNPamXi49qEfd3tYsc1VcVChfhldG_UD1W1s%26e%3D&data=02%7C01%7CJoshua.Vermaas%40nrel.gov%7Cd65bb448805e4f24cd2d08d6459fbfe3%7Ca0f29d7e28cd4f5484427885aee7c080%7C0%7C0%7C636772949761307269&sdata=rZOMh70qljZ3BA8KdyJTm9EqxV7bmT4%2FuVs%2FwY8Ebjg%3D&reserved=0>
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 : Tue Dec 31 2019 - 23:20:19 CST