Due to problems compiling, Does opensuse have directory structure different from other distros

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?

thanks, tom kosvic

@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.

Do you have a specific example?

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.

Also having problem with qgis mapping software.

tom kosvic

@tckosvic so for FreeFem, did you run autoreconf -fi, then ./configure --help, there are lots of options…?

I have not but I will look into it

freefem “make” still fails at:

“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:

/usr/include/c++/7/bits/postypes.h:216:5: note:   template argument deduction/substitution failed:
In file included from compositeFESpace.cpp:20:0:
./../../3rdparty/include/BemTool/bemtool/miscellaneous/htool_wrap.hpp:64:28: note:   ‘const Cplx {aka const std::complex<double>}’ is not derived from ‘const std::fpos<_StateT>’
     if( !( alpha == 1.0+1i*0.0) ){
                            ^~~
make[3]: *** [Makefile:699: compositeFESpace.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/home/tom/FreeFem/src/mpi'
make[2]: *** [Makefile:553: all-recursive] Error 1
make[2]: Leaving directory '/home/tom/FreeFem/src'
make[1]: *** [Makefile:808: all-recursive] Error 1
make[1]: Leaving directory '/home/tom/FreeFem'
make: *** [Makefile:758: all] Error 2
(base) tom@mydesktop:~/FreeFem>

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.

tom kosvic

1 Like

@tckosvic I’m on Tumbleweed using 13.2.1… So export CC and CXX to your desired version then run autoreconf -fi etc

export CC=/usr/bin/gcc-12
export CXX=/usr/bin/c++-12
autoreconf -fi
....

Or can add to the configure as well, just to make sure…

I was just in middle of trying to compile FreeFem on my tumbleweed vm. I’m in the process of updating tw now.

I’ll give that a try and report back.

tom kosvic

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

@tckosvic it should it’s on c++=11? Again, a perusal on the configure log may show a no on some of the c++ tests?

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?

Will need some instructions if you have time.

thanks tom kosvic

Looking at configure file to see where any gcc settings might be. File is 25k lines. Going to take a while to look at this.

@tckosvic my bad… export CXX=/usr/bin/g++-12

@malcolmlewis, with CXX set to g++12:

(base) tom@mydesktop:~/FreeFem> echo $CXX
/usr/bin/g++-12
(base) tom@mydesktop:~/FreeFem> 

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.

tom kosvic

@tckosvic did you run make clean, or start from a fresh git download?

started from fresh download

tom kosvic

@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.