View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002642 | OpenFOAM | Bug | public | 2017-07-31 10:24 | 2017-08-01 09:46 |
Reporter | lorenzotrevisan | Assigned To | henry | ||
Priority | low | Severity | tweak | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x86_64 | OS | Slackware | OS Version | 14.2 |
Fixed in Version | dev | ||||
Summary | 0002642: extend OpenFOAM compilation compatibility on Linux platforms: readline needs -lncurses if ncurses is installed | ||||
Description | in order to compile OpenFOAM on Linux with unmodified version of GNU readline, it is necessary to modify row 16 of the file: $FOAM_UTILITIES/mesh/manipulation/setSet/Allwmake from: export LINK_FLAGS="-lreadline" to: export LINK_FLAGS="-lreadline -lncurses" | ||||
Steps To Reproduce | copile OpenFOAM on Slackware following the official compilation instructions | ||||
Additional Information | http://www.linuxquestions.org/questions/slackware-14/readline-problem-bug-4175479543/ | ||||
Tags | compilation | ||||
|
How many Linux distributions have you tested this change on? Do you know if there are any on which it does not work? |
|
Dear Henry, i tested this change for OpenFOAM 4.0 4.1 and 5.0 on Slackware 14.2 64 and 32 bit; Deabian and RedHat like distributions should modify the system readline source in order not to need this change. Now i do not have the resources to test on Ubuntu but i estimate that the change should not affect the standard compilation of OpenFOAM: do You want that i try? Thank You in advance for Your attantion. Best regards |
|
ncurses in not installed by default on Ubuntu and so your proposed change would cause a compilation failure of OpenFOAM. It may be possible to test the availablity of ncurses in the same manner as readline by checking for the existence of /usr/include/ncurses/ncurses.h and add -lncurses to the link line if it does. This would work for Ubuntu and OpenSuSE Tumbleweed but I don't know about the others. |
|
Dear Henry, i think that Your suggestion should be a smart solution that would work for RHEL-clones too. I am not a programmer, but if i have well understood, the change that You propose shoul be something similar to: if [ -f /usr/include/readline/readline.h ] then echo " found <readline/readline.h> -- enabling readline support." export COMP_FLAGS="-DHAS_READLINE" if [ -f /usr/include/ncurses.h ] then echo " found <ncurses.h> -- enabling readline with ncurses support." export LINK_FLAGS="-lreadline -lncurses" else export LINK_FLAGS="-lreadline" fi Thank You very much for the help. |
|
Resolved by commit 1081f8c0465b9ecdf1016976059353717faf3465 |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-07-31 10:24 | lorenzotrevisan | New Issue | |
2017-07-31 10:24 | lorenzotrevisan | Tag Attached: compilation | |
2017-07-31 13:59 | henry | Note Added: 0008484 | |
2017-07-31 15:04 | lorenzotrevisan | Note Added: 0008485 | |
2017-07-31 15:10 | henry | Note Added: 0008486 | |
2017-07-31 16:49 | lorenzotrevisan | Note Added: 0008487 | |
2017-08-01 09:46 | henry | Assigned To | => henry |
2017-08-01 09:46 | henry | Status | new => resolved |
2017-08-01 09:46 | henry | Resolution | open => fixed |
2017-08-01 09:46 | henry | Fixed in Version | => dev |
2017-08-01 09:46 | henry | Note Added: 0008489 |