I like to compile many of my apps. I can store and run them as user and save root space for one reason.
I have trouble often in trying to compile code obtained from git hub. Most often problems are in “make” process or “link” process not finding some dependency it needs. Very often the dependency is loaded in system root but compilation script doesn’t find it. Providing paths for the compilation script often solves the problem. Sometimes not.
Makes me wonder whether openSUSE has a directory structure or stores files in “non-standard” places where developers don’t point their compilation/link scripts to?
If one knew about any differences in locations between openSUSE and, e.g., ubuntu or fedora file locations it might make compilations easier. Anyone have any idea?
@tckosvic that all depends on the build tools being used, if you look at how openSUSE rpms build and the use of macros to pre-configure the locations etc.
For example use ./configure --help to see how you can configure for your system, same with cmake etc.
Right now I am trying unsuccessfully to compile FreeFem pde solver software. This has quite a bit different compilation structure though. Not really a good example but it still won’t compile for me.
“cannot find -lnlopt_cxx: No such file or directory”
I have libnlopt0 and nlopt-devel installed. There are no more nlopt packages.
I will now try to download and install nlopt or else look at rpmfind to see if it is available.
thanks for tip on ./configure --help I always assumed that would give generic help on “configure” not that it would give so much info on what is being compiled
@tckosvic you need to look where the system files are… (as per the configure --help)
Then you need to decide from the configure output which ones you want to use system (eg mumps superlu nlopt etc) by a --with-some-option=/usr/include/... or download/build locally.
zypper in gcc-fortran Ipopt-devel nlopt-devel
autoreconf -fi
./configure --enable-download \
--enable-optim \
--with-nlopt-include=/usr/include \
--prefix=${HOME}/FreeFem-install
cd 3rdparty/ff-petsc
make petsc-slepc
cd -
./reconfigure
make V=1 -j2
make check
(lots of tests... ;) )
============================================================================
Testsuite summary for FreeFEM 4.13
============================================================================
# TOTAL: 41
# PASS: 40
# SKIP: 1
....
SKIP: Helmholtz_circle_Dirichlet_simple.edp
============================================================================
Testsuite summary for FreeFEM 4.13
============================================================================
# TOTAL: 6
# PASS: 5
# SKIP: 1
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
make[4]: Leaving directory '/data/development/github/FreeFem-sources/examples/bem'
make[3]: Leaving directory '/data/development/github/FreeFem-sources/examples/bem'
make[2]: Leaving directory '/data/development/github/FreeFem-sources/examples/bem'
make[2]: Entering directory '/data/development/github/FreeFem-sources/examples'
make[2]: Nothing to be done for 'check-am'.
make[2]: Leaving directory '/data/development/github/FreeFem-sources/examples'
make[1]: Leaving directory '/data/development/github/FreeFem-sources/examples'
make[1]: Entering directory '/data/development/github/FreeFem-sources'
make[1]: Leaving directory '/data/development/github/FreeFem-sources'
/data/development/github/FreeFem-sources>
@tckosvic I also see there is a --enable-summary configure option which will give a run down on enables libraries etc, but a perusal of the configure output should let you decide what options your wanting etc…
@malcolmlewis, I really appreciate your getting involved with me and FreeFem. I am still getting make errors in compiling FreeFem. I included snippet below:
Make had problem with file called: compositeFESpace
I noticed that my system is using c++ version 7-3.9 as gcc-c++ ( see path to compositeFESpace.cpp above) while others up to gcc12-c++ are installed on system.
What c++ did you use? Do you think setting ./configure with flag to higher c++ compiler might help?
Hope my issues are not taking too much of your time but it is greatly appreciated.
FreeFem and all dependencies compiled with no errors on my tumbleweed vm with gcc++ = 13.
Thus, I have to conclude that the gcc++ version of 7.3 on leap 15.5 is the root of the fail to compile problem.
It is sad that there was no indication of the cause and if you hadn’t run this and informed me you ran on tumbleweed, I might not have never suspected gcc++.
There is no version “requirements” list for FreeFem that I can find. I will send them an angry note saying that they need a requirements list or more elaborate version checks in their configure/make code.
I will now run compilation on leap 15.5 with upgraded gcc++ as you suggested to complete the verification.
very interesting investigation. thanks for you sticking with it, tom kosvic
Problem trying to change gcc++ to v12 with export commands.
FreeFem ./configure now reports error as below:
checking for unzip... yes
checking for m4... yes
checking for bison... yes
checking for flex... yes
checking for cmake... yes
checking for patch... yes
configure: fatal error : sizeof pointer ! or no c++ compiler: /usr/bin/c++-12
configure: error: Sorry sizeof c++ pointer are not 4 or 8
(base) tom@mydesktop:~/FreeFem>
There is still a simlink in /usr/bin : “lrwxrwxrwx 1 root root 5 Aug 23 2021 c++ → g+±7”
that points to v7. Might be the cause??? Should I change this if it is cause of the pointer problem?
I got 2 errors from the builtin make check of the petsc compilation.
When compiling FreeFem itself I again got the same messages regarding “compositeFESpace.cpp” that are posted above. My only course now would be to look at what I might tinker with in compositeFESpace.cpp to get past the problem.
I think pursuing FreeFem on leap 15.5 is not worth the effort. I have a running compilation on tumbleweed vm that i can tinker with. If I decide to go more deeply into FreeFem, I will pick this up again on leap 15.5.
I can’t tell the FreeFem authors that they should require higher version of gcc since I couldn’t prove it.
Thanks for all the knowledge and help. I’d rather be looking at navier-stokes equation solver tests than this stuff.
@tckosvic I also compile from source many of the programs I use, including QGIS. I have done it for over 10 years and although I sometimes have had problems I believe I seldom have them now. Feel free to describe your problem and perhaps I can help you.