installation and setup issues under ubuntu 19.04

276 views
Skip to first unread message

Lewis Goss

unread,
Aug 15, 2019, 8:10:59 PM8/15/19
to cpseis-user
I have tried to set-up cpseis under ubuntu 19.04.

I think I probably have some mistakes in my set-up:

I modified by .bashrc to have:
export PATH=$PATH:/home/lewisgoss/cpseis/thirdparty/mpich2-1.1/platforms/bin
export PATH=$PATH:/home/lewisgoss/cpseis
export PATH=$PATH:/home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin
export PATH=$PATH:/home/lewisgoss/cpseis/scripts
export CPSEIS_INSTALL_DIR=/home/lewisgoss/cpseis
export THIRDPARTY_DIR=/home/lewisgoss/cpseis/thirdparty
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/lewisgoss/cpseis/thirdparty/fftw-2.1.5/platforms/lib
export CPSEIS_HOME=/home/lewisgoss/cpseis

I did % install_cpseis mpich2 gfortran

This runs along for a nice little while.

When I try to run cfe I get the following message:
% cfe
Incorrect installation: Make sure you have binary directories set up in /home/lewisgoss/cpseis/platforms//bin.

I checked showenv.sh
% showenv.sh
CPSEIS_ENVIRONMENT=
CPSEIS_ARCH=
CPSEIS_INSTALL_DIR=/home/lewisgoss/cpseis
THIRDPARTY_DIR=/home/lewisgoss/cpseis/thirdparty

I tried this:
% EXE=$CPSEIS_INSTALL_DIR/etc/cpseis_bashrc.sh
[ -e $EXE ] && . $EXE mpich2 gfortran

That moved things along a little.  Now when I type
% cfe
The CPSeis Licence flashes on screen, but then I see
Exit OpenCFE

Also, if I try
% icps test01.wrk
I get along of things on screen flashing by, then:
CPS aborting for following reason:
Setup errors occurred
++++++++++++++++++++++++++++++++++

===================================================
Fatal error while running test01.wrk
===================================================



My install_cpseis.log has the following messages.  Seems to want me to define SPWSDIR variable which I have not done.
Default architecture will install.  If you want to change it, go to
/home/lewisgoss/cpseis/scripts/cpseis_bashrc.sh and change CPSEIS_ARCH.
CPSEIS_ARCH=Linux_x86_64__gfortran_mpich2
Machine is     : Linux
Architecture is: x86_64
Compiler is    : gfortran
MPI is         : mpich2
Third party dir: /home/lewisgoss/cpseis/thirdparty
Installation dir: /home/lewisgoss/cpseis
Hit Enter to continue...
...
making sps_fortran_dependencies
mpif90 -g -fPIC -fno-range-check -ffree-form -ffree-line-length-none -DLINUX -DLINUXI -I. -I/home/lewisgoss/cpseis/thirdparty/mpich2-1.1/platforms/Linux_x86_64__gfortran_mpich2/include -o /home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin/sps_fortran_dependencies  sps_fortran_dependencies.o

making spws_depend
cd /home/lewisgoss/cpseis/spws_home/making/Linux_x86_64__gfortran_mpich2 && make depend
make[1]: Entering directory '/home/lewisgoss/cpseis/spws_home/making/Linux_x86_64__gfortran_mpich2'
makefile:43: *** environment variable SPWSDIR not set.  Stop.
make[1]: Leaving directory '/home/lewisgoss/cpseis/spws_home/making/Linux_x86_64__gfortran_mpich2'
make: *** [Makefile:327: spws_depend] Error 2
cfe installed at: /home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin
/home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin
icps installed at: /home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin
/home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin
There are 0 errors in your setup. So far, so good.
Normal exit.  Hit return to exit

Tahir Helvaci

unread,
Aug 16, 2019, 2:24:18 PM8/16/19
to cpseis-user
Hi Lewis,

You have not mentioned x86 or x64 architecture. Any how please follow the instructions at HOW TO MAKE CPSEIS. 
I attach my .bashrc file for your modification.

Pls Build the thirdparty folder first. 
I'll try to help you as you go along the build process. 

Regards,

Tahir Helvaci




--
You received this message because you are subscribed to the Google Groups "cpseis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpseis-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cpseis-user/d2c85ce1-2699-450e-a8b8-810214775b7e%40googlegroups.com.
BASHRC

Bill Menger

unread,
Aug 16, 2019, 10:51:23 PM8/16/19
to cpseis-user
Tahir has the right idea.  Make sure your .bashrc file has proper definitions in it for your architecture.  Here is one of mine on a CentOS7.2 VM.
export MACHINE=$(uname -m)
export SYSTEM=$(uname -s)
export GLIBCVERSION=$(cat $(which ldd) | grep "ldd (GNU libc)" | sed "s/.* //;s/'//g")
export CPSEIS_INSTALL_DIR=/apps/cpseis
export THIRDPARTY_DIR=/apps/thirdparty
. $CPSEIS_INSTALL_DIR/etc/cpseis_bashrc.sh mpich2 gfortran
# I also add seismic unix so that the SU module will work
export CWPROOT=/apps/su
export PATH=$PATH:$CWPROOT/bin

There will be a file in $CPSEIS_INSTALL_DIR/spws_home/making/makefile.$CPSEIS_ARCH that might need to be modified.  Around line 7 is a statement:
permitted_hosts = (something)
change it to read:
permitted_hosts = unrestricted
and below in it, decide if you want to use dynamic linking to X libraries or static.  I don't remember what works best for Ubuntu, but you might need to change that part and also the part that looks for libstdc++.  That location varies with different Linux distributions.
Good luck, ... and if possible, see if you can attach your log file so we can figure out where the errors are coming from.
Bill

--
You received this message because you are subscribed to the Google Groups "cpseis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpseis-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cpseis-user/d2c85ce1-2699-450e-a8b8-810214775b7e%40googlegroups.com.


--
Bill Menger
Houston HPC Services, Inc.
(281) 633-6820

Lewis Goss

unread,
Aug 16, 2019, 11:58:08 PM8/16/19
to cpseis-user
Thanks for the advice, I have made some changes to my .bashrc, and other things.

I have made a small amount of progress, still not working though.  I solved the SPWSDIR problem.

Just a question about gfortran, I am using gfortran-8 as my default. Is there any reason to think I should revert back to older version of gfortran?  I had to go back to gfortran-6 to get FreeUSP to compile.  In addition, I have gfortran-7 installed if that would help, and I have clang installed if that would work better than gcc.  I have sometimes found Seismic Unix to compile better under clang than gcc (that was under Fedora, not Ubuntu).  Thanks.

New problem is here:
/home/lewisgoss/cpseis/spws_home/oop/sp/seis_drag.cc:253:15: error: ‘max’ was not declared in this scope
      width1 = max(maxx, _oversp->_image.getChainImage()->getGraphWidth());
....
make[2]: *** [/home/lewisgoss/cpseis/spws_home/making/makefile.spws:911: seis_drag.o] Error 1
make[2]: Leaving directory '/home/lewisgoss/cpseis/spws_home/oop/sp/Linux_x86_64__gfortran_mpich2'
make[1]: *** [makefile:128: sp] Error 2

make[1]: Leaving directory '/home/lewisgoss/cpseis/spws_home/making/Linux_x86_64__gfortran_mpich2'
make: *** [Makefile:322: spws] Error 2


cfe still doesn't work, etc.  Similar performance as before, License pops on screen, than Exit OpenCFE prints.
I have attached the install_cpseis.log.  Thanks.
install_cpseis.log

A. Tahir Helvaci

unread,
Aug 17, 2019, 3:26:01 PM8/17/19
to cpsei...@googlegroups.com
Hi Lewis,
 
Please change max and min macros to shouty caps ie MAX or MIN since there is clash for gnu c. To search for min( and max(
 
cd to cpseis root
then run the command
grep –in  ‘max’  `du –a .*  | awk ‘{print $2}’`         all the files containing max repeat for min as well.
 
for direct change run the command
sed -- -i ‘/s/max/MAX/g’ in the folder that cotaimning max and/or  min macros. CAUTION: Backup files before change.
 
See how does it come along.
 
Regards,
 
Tahir Helvaci
--
You received this message because you are subscribed to the Google Groups "cpseis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpseis-user...@googlegroups.com.

Lewis Goss

unread,
Aug 17, 2019, 6:49:41 PM8/17/19
to cpsei...@googlegroups.com
Can you say that with a little more detail?  Sorry, you are moving at about twice my speed.  I copied the command you said, and this occurred:

~/cpseis$ grep –in  ‘max’  `du –a .*  | awk ‘{print $2}’`
du: cannot access '–a': No such file or directory
awk: cmd. line:1: ‘{print
awk: cmd. line:1: ^ invalid char '�' in expression
grep: ‘max’: No such file or directory

The install_log indicates the problem happened in this directory:
/home/lewisgoss/cpseis/spws_home/oop/sp/seis_drag.cc


Bjorn_Miese

unread,
Aug 17, 2019, 10:29:01 PM8/17/19
to cpseis-user


On Saturday, August 17, 2019 at 11:58:08 AM UTC+8, Lewis Goss wrote:

Just a question about gfortran, I am using gfortran-8 as my default. Is there any reason to think I should revert back to older version of gfortran?  I had to go back to gfortran-6 to get FreeUSP to compile.  In addition, I have gfortran-7 installed if that would help, and I have clang installed if that would work better than gcc.  I have sometimes found Seismic Unix to compile better under clang than gcc (that was under Fedora, not Ubuntu).  Thanks.

New problem is here:
/home/lewisgoss/cpseis/spws_home/oop/sp/seis_drag.cc:253:15: error: ‘max’ was not declared in this scope
      width1 = max(maxx, _oversp->_image.getChainImage()->getGraphWidth());
....
make[2]: *** [/home/lewisgoss/cpseis/spws_home/making/makefile.spws:911: seis_drag.o] Error 1
make[2]: Leaving directory '/home/lewisgoss/cpseis/spws_home/oop/sp/Linux_x86_64__gfortran_mpich2'
make[1]: *** [makefile:128: sp] Error 2
make[1]: Leaving directory '/home/lewisgoss/cpseis/spws_home/making/Linux_x86_64__gfortran_mpich2'
make: *** [Makefile:322: spws] Error 2



gfortran is no problem. Rather the g++ is. Any version 6.0 or higher will give you numerous error messages involving 'max'
due to some header changes. I have recently attempted the new Debian 10 and hit this problem again.
I don't know if one can install gcc 5.x in Ubuntu. So Ubuntu 16.04 was the last with such an old gcc. That is end of life
in April 2021.

Bill Menger

unread,
Aug 18, 2019, 8:37:53 AM8/18/19
to cpseis-user
Lewis and Bjorn,
I found several instances in the c++ codes of spws_home where we had defined max explicitly as a macro.  It was not consistently coded this way, and was never elevated to a common header file.  For instance, in ...spws_home/sl/view_bar.cc on line 31 max is defined as:
#define max(a,b) ( (a) > (b) ? (a) : (b) )
So one approach is to add this definition in the specific modules that are giving you the error.  Another would be to create a header file and include it.  I don't have time to do this at the moment, but if someone does make a code change please sent it to me and I'll update the repository.
I don't know of any other issues with the newer gfortran / g++.
Bill

--
You received this message because you are subscribed to the Google Groups "cpseis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpseis-user...@googlegroups.com.

Tahir Helvaci

unread,
Aug 18, 2019, 9:43:47 AM8/18/19
to cpseis-user
Hi Lewis,
cd /opt/cpseis/src  (for my cpwroot directory)

grep -i 'max(' `du -a .* | awk '{print $2}'`  (note the space between du and -a space .* )

you should edit every file using max as a macro to MAX (backup src directory before changing any thing. I mean keep the original source in some saved place for referral if the need be)

Repeat the same thing for min as well.
../include /cgm_common.h contains #define max(a,b) .... You should change to MAX(a,b) ...











Lewis Goss

unread,
Aug 18, 2019, 5:28:43 PM8/18/19
to cpsei...@googlegroups.com
Dear Tahir et al.:

1) Thanks for the more detailed instructions about shouty caps. I haven't tried it yet, but thanks.
2) The oldest version of gcc that I can install is gcc-6.  I installed gcc-6, tried, it did not help.
3) I haven't figured out how to install older gcc yet, not sure if it would help.
4) I followed Bill's suggestion and modified the code here to define min & max:
/home/lewisgoss/cpseis/spws_home/oop/sp/seis_drag.cc
...
#include "sp/seis_drag.hh"
#include "sp/inform_list.hh"
#include <stdlib.h>
#include "cprim.h"

#define max(a, b) (  (a) > (b) ? (a) : (b)  )
#define min(a, b) (  (a) < (b) ? (a) : (b)  )

static char *draghelp= "mouse*DRAG:  BTN#1: Drag Image, \

...
5) That fixed the problem with seis_drag.
6) New problem now (progress!)
/usr/include/c++/8/bits/stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                                        ^
/usr/include/c++/8/bits/stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)

I am wondering now if I should circle back to Tahir's suggestion about shouty caps for max and min.  Seems like there is a function in stl_algobase with 3 arguments, but cpseis uses only 2.

Lewis Goss

unread,
Aug 18, 2019, 6:25:42 PM8/18/19
to cpsei...@googlegroups.com
Uploaded updated cpseis_install.log
install_cpseis.log

Bill Menger

unread,
Aug 18, 2019, 10:13:18 PM8/18/19
to cpseis-user
I've not run into this many min/max issues before.  My /usr/include/c++ is version 4.8.2.  Is yours substantially newer?  Something in the compiler has changed.
Bill

Lewis Goss

unread,
Aug 19, 2019, 9:12:30 PM8/19/19
to cpsei...@googlegroups.com
Dear Bill:

The default c++ under ubuntu 19.04 is v8 (8.3.0).  The oldest one I can easily install is v6 (6.5.0). 
1) Tahir has suggested using shouty caps for min and max.  This seems like a lot of effort to try, and prone to mistake on my part, not sure if it will work.
2) Bjorn has suggested using c++ v5. I like this idea, but I haven't yet figured out how to install the older version of c++.   I have a question posted to Ask Ubuntu about it.  I have already tried a couple of things, but no success yet.
3) I was wondering if clang would work?  I had to compile OpenSeaSeis under Fedora with this.

Bill Menger

unread,
Aug 19, 2019, 10:00:30 PM8/19/19
to cpseis-user
Unfortunately, my hands have been off of this for a few months and I'm rusty.  I've never used clang.  Looking at my Centos 7.4 build machine and my Centos7.2 vm on my laptop, both have gcc/g++/gfortran version 4.8.5.  I looked up how to downgrade to 4.8 and this answer looked the cleanest.
image.png

Bill Menger

unread,
Aug 19, 2019, 10:02:20 PM8/19/19
to cpseis-user
and this one isn't "dissed" as much as the first solution I just sent.  However you'll need to login to the site to get the full answer:   https://askubuntu.com/questions/724872/downgrade-gcc-from-5-2-1-to-4-9-ubuntu-15-10
image.png

Lewis Goss

unread,
Aug 19, 2019, 11:59:43 PM8/19/19
to cpsei...@googlegroups.com
Dear Bill et al:

I just downloaded and installed from the deb files for gcc-5, cpp-5, gcc-5-base, libgcc-5-dev, libasan2, and libmpx0 from Ubuntu 18.10.  I was able to compile a sample 'hello_world.c' program using gcc-5.  I kept my current gcc-8 and gcc-6 installs untouched so far, but added softlinks pointing /usr/bin/gcc to gcc-5.   I am missing some packages because I do not have /usr/include/c++/5, but do have /usr/include/c++/ for versions 6 and 8.  Hopefully I can figure out any other missing packages needed and get them installed as well.  I have another question posted to Ask Ubuntu.

Bjorn_Miese

unread,
Aug 20, 2019, 7:14:27 AM8/20/19
to cpseis-user


On Sunday, August 18, 2019 at 9:43:47 PM UTC+8, NickCrew wrote:
Hi Lewis,
cd /opt/cpseis/src  (for my cpwroot directory)

grep -i 'max(' `du -a .* | awk '{print $2}'`  (note the space between du and -a space .* )

you should edit every file using max as a macro to MAX (backup src directory before changing any thing. I mean keep the original source in some saved place for referral if the need be)

Repeat the same thing for min as well.
../include /cgm_common.h contains #define max(a,b) .... You should change to MAX(a,b) ...
 
That is an interesting idea, Tahir.
Although instead of cpseis/src should the directory be cpseis/spws_home/oop and directories below?
 I had removed the min max macros definitions from plot_image.hh (they are actualy defined in other places, but only that header file seems to cause a conflict.)
Then I put the macro definitions in more than 40 files that use them. I had tried just modifying a few header files, but couldn't find a quick solution.

And to Bill, well users in industry are probably still using SLE 12 or RHEL 7 (or free clones thereof). The enterprise linux has been using gcc version 4.x for
many years. Unfortunately the latest RHEL jumps to gcc 8 and SLE to gcc 7, which breaks a few things (not just CPSeis). So I assume plenty of companies would be hanging on to Centos 7 for example.
One the other hand, I imagine those outside the big-corporations are probably using a distro such as Ubuntu, Fedora or Suse Leap, where gcc has gone past version 6.
 

Lewis Goss

unread,
Aug 20, 2019, 9:31:58 PM8/20/19
to cpsei...@googlegroups.com
I took a look at work today, where we use CentOS 7, and the gcc compiler is 4.8.5.  Moving on...
OK, the additional package to install for gcc-5 was libstdc++-5-dev.  That gets around the min/max error.  On to the next error! 
The next error is this:
/home/lewisgoss/cpseis/spws_home/include/sp/arrows.h:60:74: error: narrowing conversion of ‘192’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]

I wonder if there are some additional packages I need to install for gcc-5 from Ubuntu 18.10?  Anyhow, still not working. 

--
You received this message because you are subscribed to the Google Groups "cpseis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpseis-user...@googlegroups.com.

A. Tahir Helvaci

unread,
Aug 21, 2019, 11:17:05 AM8/21/19
to cpsei...@googlegroups.com
Hi Everyone,
 
I have already replied this narrowing problem. Add a compiler switch in
spws_home/making/makefile.Linux bla bla bla ...... file –> ~line 25+
-Wno-narrowingcwitch to  CFLAGS (CXX command)
 
Tahir Helvaci

Bjorn_Miese

unread,
Aug 23, 2019, 7:09:59 AM8/23/19
to cpseis-user
I tried doing this to kludge the min/max macros:
find $SPWSDIR -type f -writable -name '*[c|h]' -exec sed -i 's/max/MAX/g' {} \;
find $SPWDDIR -type f -writable -name '*[c|h]' -exec sed -i 's/min/MIN/g' {} \;
It's brutal and ugly, but I hoped at least it would be consistent.
There are a couple of header files containing max or min in their names, so you have to make copies of them too.
But then the compiler will still hit a roadblock -
 XmNMAXimum and XmNMINimum undeclared.
XmNmaximum and XmNminimum come from the motif header files, which you can't fiddle with.
Maybe you could make another script to restore those 2, but likely another one would pop up to bite you.

So there is no quick fix, have to manually edit all those file.

Lewis Goss

unread,
Aug 23, 2019, 7:22:41 AM8/23/19
to cpsei...@googlegroups.com
I have decided to go back to Ubuntu 16.04; last vrs of Ubuntu that supports gcc-4.8.5

--
You received this message because you are subscribed to the Google Groups "cpseis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpseis-user...@googlegroups.com.

Lewis Goss

unread,
Aug 26, 2019, 8:46:27 PM8/26/19
to cpsei...@googlegroups.com
I have erase my Ubuntu 19.04 installation, made a fresh install of Ubuntu 16.04.  Installed gcc-4.8.5, gfortran-4.8.5.  Also Seismic Unix, FreeUSP, FreeDDS.  Got back to trying to install cpseis.  Cribbed from previous notes, still failing ultimately.  No regrets, installing FreeUsp, and FreeDDS went very smoothly with 4.8.5 version of compilers.

Here is the current status.
% install_cpseis mpich2 gfortran
...runs for a while...
f95: error: /usr/lib/gcc/x86_64-redhat-linux/COMPILE_AND_LINK_ISSUES: No such file or directory
f95: error: core: No such file or directory
f95: error: documentation: No such file or directory
f95: error: etc: No such file or directory
f95: error: Exclude: No such file or directory
f95: error: GDB_ISSUES_WITH_FORTRAN: No such file or directory
f95: error: HOW_TO_MAKE_CPSEIS: No such file or directory
f95: error: include: No such file or directory
f95: error: installation: No such file or directory
f95: error: install_cpseis: No such file or directory
f95: error: install_cpseis.sh: No such file or directory
f95: error: license.txt: No such file or directory
f95: error: list.txt: No such file or directory
f95: error: log: No such file or directory
f95: error: Makefile: No such file or directory
f95: error: opencfe: No such file or directory
f95: error: OUTPUT_FROM_MAKE: No such file or directory
f95: error: platforms: No such file or directory
f95: error: README: No such file or directory
f95: error: README.sh: No such file or directory
f95: error: sample_work_files: No such file or directory
f95: error: scripts: No such file or directory
f95: error: spws_dir: No such file or directory
f95: error: spws_home: No such file or directory
f95: error: src: No such file or directory
f95: error: templates: No such file or directory
f95: error: test: No such file or directory
f95: error: testjob1.wrk: No such file or directory
f95: error: testjob2.wrk: No such file or directory
f95: error: test_svn.txt: No such file or directory
f95: error: thirdparty: No such file or directory
f95: error: USING_CPSEIS_ANYWHERE: No such file or directory
f95: error: wrappers: No such file or directory
f95: error: www/libstdc++.so: No such file or directory
/home/lewisgoss/cpseis/spws_home/making/makefile.spws:1012: recipe for target 'cbyt' failed
make[2]: *** [cbyt] Error 1
make[2]: Leaving directory '/home/lewisgoss/cpseis/spws_home/programs/cbyt/Linux_x86_64__gfortran_mpich2'
makefile:131: recipe for target 'cbyt' failed
make[1]: *** [cbyt] Error 2

make[1]: Leaving directory '/home/lewisgoss/cpseis/spws_home/making/Linux_x86_64__gfortran_mpich2'
Makefile:497: recipe for target 'cbyt' failed
make: *** [cbyt] Error 2

cfe installed at: /home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin
/home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin
icps installed at: /home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin
/home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin
There are 0 errors in your setup. So far, so good.
Normal exit.  Hit return to exit

I attached the current version of the install_cpseis.log
install_cpseis.log

Lewis Goss

unread,
Aug 27, 2019, 9:44:21 PM8/27/19
to cpsei...@googlegroups.com
Dear Folks:

Looking more closely at my install_cpseis.log, this happens 3 times:
g++: fatal error: no input files
g++: fatal error: no input files
g++: fatal error: no input files
I guess there is something wrong with my setup, but what it is I don't know.
I fixed some issues with X11 installation, re-ran, very similar result.  Still
g++: fatal error: no input files
g++: fatal error: no input files
g++: fatal error: no input files

A. Tahir Helvaci

unread,
Aug 28, 2019, 4:15:18 AM8/28/19
to cpsei...@googlegroups.com
Hi Lewis,
 
It seems that you are on the wrong track. I have already warned that the goal is  to replace MAX( and MIN( to shouty caps so not MAX and not MIN in sed as it will change anything!
One more issue still we don’t know if you are in X64 or X86 architecture.
 
Please revert to original source files and follow the instructions in HOW-TO in cpseis root directory. Please check and recheck the bash.rc file. The “thirdparty” directory is very important. Programs must be setup properly. Follow the scripts in cpseis/script foilder. Be careful with java version normally it is 1.8 something but cpseis uses 1.6. Remove the 1.8 path from bash.rc
 
As for gcc version I use 9.1.1 without hassle in Fedora X64 version 30.
 
waiting for your feedback.
 
Tahir Helvaci
 
 
 
 
From: Lewis Goss
Sent: Wednesday, August 28, 2019 4:44 AM

Lewis Goss

unread,
Aug 28, 2019, 7:52:41 AM8/28/19
to cpsei...@googlegroups.com
Dear Tahir et al:

First, thanks for the feedback.  I have switched to Ubuntu 16.04 (fresh install) and gcc-4.8.5. I no longer have any complaints about min or max in my cpseis_install.log. 
x86_64 is my architecture.  I am using java 1.6, but thanks for the guidance.

% java -version
java version "1.6.0_14"
Java(TM) SE Runtime
Environment (build 1.6.0_14-b08)
Java HotSpot(TM) 64-Bit Server VM (build 14.0-b16, mixed mode)

% cpseis_testenv
true=true
CPSEIS_ARCHITECTURE = Linux_x86_64__gfortran_mpich2
Java=/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64__gfortran_mpich2/bin/java java compiler=/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64__gfortran_mpich2/bin/javac
Fortran=/home/lewisgoss/cpseis/thirdparty/mpich2-1.1/platforms/Linux_x86_64__gfortran_mpich2/bin/mpif90
MPI=/home/lewisgoss/cpseis/thirdparty/mpich2-1.1/platforms/Linux_x86_64__gfortran_mpich2/bin/mpirun
cfe=/home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin/cfe
icps=/home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin/icps
cbyt=

NickCrew

unread,
Aug 29, 2019, 4:34:31 AM8/29/19
to cpseis-user
Hi Lewis,

You have not specified ldd version in your env setting. I herewith attach mine for ldd
please run ldd --version for checking.

So create_directories in cpseis/scripts directory will run accordingly.

true=true
CPSEIS_ARCHITECTURE = Linux_x86_64_2.29_gfortran_mpich3
Java=/opt/thirdparty/jdk/platforms/Linux_x86_64_2.29_gfortran_mpich3/bin/java java compiler=/opt/thirdparty/jdk/platforms/Linux_x86_64_2.29_gfortran_mpich3/bin/javac
Fortran=/opt/thirdparty/mpich-3.2.1/platforms/Linux_x86_64_2.29_gfortran_mpich3/bin/mpif90
MPI=/opt/thirdparty/mpich-3.2.1/platforms/Linux_x86_64_2.29_gfortran_mpich3/bin/mpirun
cfe=/opt/cpseis/platforms/Linux_x86_64_2.29_gfortran_mpich3/bin/cfe
icps=/opt/cpseis/platforms/Linux_x86_64_2.29_gfortran_mpich3/bin/icps
cbyt=/opt/cpseis/platforms/Linux_x86_64_2.29_gfortran_mpich3/bin/cbyt
seis@defne: [/opt/cpseis] 1022 $
To unsubscribe from this group and stop receiving emails from it, send an email to cpseis-user+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "cpseis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpseis-user+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "cpseis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpsei...@googlegroups.com.

Lewis Goss

unread,
Aug 29, 2019, 8:52:14 PM8/29/19
to cpsei...@googlegroups.com
Dear Nick et al:

I don't see any place specifically to specify the ldd version, but this is what I get when I check my ldd version:

% ldd --version
ldd (Ubuntu GLIBC 2.23-0ubuntu11) 2.23
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.


To unsubscribe from this group and stop receiving emails from it, send an email to cpseis-user...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "cpseis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpseis-user...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "cpseis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpsei...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cpseis-user/2400FE79CA8346D68737FCEA863BE8CB%40TPC.

--
You received this message because you are subscribed to the Google Groups "cpseis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpseis-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cpseis-user/a5e6d4de-0dcf-41c9-932e-3c98e712db5a%40googlegroups.com.

Tahir Helvaci

unread,
Aug 30, 2019, 8:35:34 AM8/30/19
to cpseis-user
so your platforms folder should seem like Linux_x86_64_2.23_gfortran_mpich2

Your testenv shows no ldd version in your platforms path.  Please correct this and let's see what we get.

Regards,

Tahir Helvaci


Lewis Goss

unread,
Aug 30, 2019, 10:25:37 PM8/30/19
to cpsei...@googlegroups.com
I hard-coded this:
% export GLIBCVERSION=2.23
This helped a fair bit, definitely made progress:
I have attached the current install_cpseis.log.  Got much farther along:

install_cpseis.log

Lewis Goss

unread,
Aug 31, 2019, 10:59:28 AM8/31/19
to cpsei...@googlegroups.com
The good news is that csv, cfg, cbyt, msepita, and va are now working for me.  cfe however still is not. 
-------------------------------------------------
% showenv.sh
CPSEIS_ENVIRONMENT=true
CPSEIS_ARCH=Linux_x86_64_2.23_gfortran_mpich2
CPSEIS_INSTALL_DIR=/home/lewisgoss/cpseis
THIRDPARTY_DIR=/home/lewisgoss/cpseis/thirdparty
----------------------------------------------------------------
% check_platform.sh
Checking the Linux_x86_64_2.23_gfortran_mpich2 build of CPSeis...
mpich2 installed at: /home/lewisgoss/cpseis/thirdparty/mpich2-1.1/platforms/Linux_x86_64_2.23_gfortran_mpich2/bin
/home/lewisgoss/cpseis/thirdparty/mpich2-1.1/platforms/Linux_x86_64_2.23_gfortran_mpich2/bin
gfortran installed at: /usr/bin
A 64 bit installation will be required.
java compiler installed at: /home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2/bin
/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2/bin
cfe installed at: /home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/bin
/home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/bin
icps installed at: /home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/bin
/home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/bin
Architecture=Linux_x86_64_2.23 Compiler_choice=gfortran MPI_choice=mpich2
Checking the make environment variables needed:
MPI=mpich2
CPSEIS_COMPILER_BASE=gfortran
There are 0 errors in your setup. All looks good.
----------------------------------------------------------------
% cpseis
Cpseis Architecture unknown. Linux_x86_64_2.23_gfortran_mpich2
Installation is located at /home/lewisgoss/cpseis
icps running with workfile /home/lewisgoss/cpseis/sample_work_files/tiny.wrk
icps passes installation test
The cbyt viewer was found
The va  package was found
-----------------------------------------------------------------------
% cfe
Exit OpenCFE

I still have the following messages that may indicate problems in my install_cpseis.log:
...
creating  makefile.depend  in  /home/lewisgoss/cpseis/spws_home/util/hdfmod
-------------------------------------------------------
cd /home/lewisgoss/cpseis/spws_home/util/hdfmod; /home/lewisgoss/cpseis/scripts/make_dependencies "g++ -MM         -DLINUX -DLINUXI -D_FILE_OFFSET_BITS=64  -DBETALIB  -I/home/lewisgoss/cpseis/spws_home/util/hdfmod  -I/home/lewisgoss/cpseis/include  -I/home/lewisgoss/cpseis/spws_home/include  -I/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2/include  -I/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2/include/linux  -I/usr/X11R6/include/X11/SM  -I/usr/X11R6/include/X11/ICE  -I/usr/X11R6/include/Xm  -I/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2/include  -I/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2/include/linux  -I/usr/include  -I/usr/X11R6/include"
--> Getting List of fortran90 source files...
ls: No match.
--> Getting List of c source files...
ls: No match.
--> Getting List of c++ source files...
ls: No match.
--> building fortran90 dependencies...
--> building XML dependencies...
--> assembling compiler command for building c and c++ dependencies...
--> building c and c++ dependencies...

g++: fatal error: no input files
compilation terminated.
--> finished

Similar messages are printed for isep and pickmerge

Bill Menger

unread,
Aug 31, 2019, 8:32:47 PM8/31/19
to cpseis-user
Hi Lewis, not sure about the last errors you mentioned, but cfe is really more important.  Try running this:
$ cfe -debug
It will show  you where it is failing and you could send the log file from the debug session.  If you look "very quickly" I think on the splash screen I show where the log files for cfe are kept.  I believe i put them in your ~./cpseis directory.  Sorry I haven't had much time to help out, but it looks like you are getting good help from the others.  I think I sent you a set of three commands a week or so ago that you can put in your .bashrc to set your machine type, GLIBCVERSION, etc.  If those commands don't work, I could modify them to run correctly on Ubuntu.  Try the $cfe -debug and see if it shows where the error is occurring.
Thanks,
Bill Menger


Lewis Goss

unread,
Aug 31, 2019, 9:53:47 PM8/31/19
to cpsei...@googlegroups.com
Dear Bill:
Thanks for the guidance, i did this:
% cfe -debug
/home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:CPSEIS_HOME/wrappers/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2/jre/lib/amd64:/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2/jre/lib/amd64/server:/home/lewisgoss/cpseis/thirdparty/mpich2-1.1/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/thirdparty/fftw-2.1.5/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/thirdparty/fftw-2.1.5/platforms/lib:/home/lewisgoss/madagascar/lib://home/lewisgoss/cpseis/wrappers/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib
/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2//bin/java -ms64m -mx64m -ss256k -Djava.util.prefs.syncInterval=2000000 com.conoco.cfe.client.application.DirectApplication file:///home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/bin/prefs.xml
Preferences file is 'file:///home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/bin/prefs.xml'
Unable to load dynamic library opencfe
Exit OpenCFE


Bill Menger

unread,
Sep 1, 2019, 8:34:03 AM9/1/19
to cpseis-user
That is helpful.  cfe is a java program that loads the library of fortran and c codes located within the $CPSEIS_INSTALL_DIR/src directory.  So it is entirely independent of the spws software for the ancillary programs like va, cbyt, msep, etc.  You can rebuild cfe by doing the following:
$cd  $CPSEIS_INSTALL_DIR/opencfe/src
$make clean
$make
You will see lots of warnings about deprecated java.  They are not important.  Once you make the new one, try again.  If it fails again with the same output, try this:
$cd $CPSEIS_INSTALL_DIR/platforms/$CPSEIS_ARCH
$rm lib/libcps.so
$make shared
and try again.  cfe uses three shared libraries, (one very small libXclipboard.so and two large ones, libcps.so and libopencfe.so).
What this second attempt does is to remove libcps so that it is rebuilt to correspond to the rebuild of libopencfe that you had just done previously.  Both of these need to be in sync.  That doesn't mean made at the same time, just that codes need to be consistent.  It is possible that somehow in your build, something didn't quite get completed in libcps.so's build or in the libopencfe.so's build.
IF both these don't work, we'll did deeper.
bill

Lewis Goss

unread,
Sep 1, 2019, 10:02:55 AM9/1/19
to cpsei...@googlegroups.com
Dear Bill:

OK, I tried both of those things and that did not work.  I went back to check the log when I 'make cfe' very carefully.
I piped the screen output to a log file, and saw this section:
............
gcc -m64 -fPIC -shared -ldl -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.3 -lsupc++ -lstdc++ -o libopencfe.so JNICfeApi.o JNICfeApiHelper.o set.o
ldd -r libopencfe.so
        linux-vdso.so.1 =>  (0x00007ffcd37fe000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f57444ab000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f57440e1000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f57448c6000)
undefined symbol: _ZNSt8ios_base4InitD1Ev       (./libopencfe.so)
undefined symbol: __gxx_personality_v0  (./libopencfe.so)
undefined symbol: dlopen        (./libopencfe.so)
undefined symbol: _ZdlPv        (./libopencfe.so)
undefined symbol: _Znam (./libopencfe.so)
undefined symbol: dlerror       (./libopencfe.so)
undefined symbol: dlsym (./libopencfe.so)
undefined symbol: _ZNSt8ios_base4InitC1Ev       (./libopencfe.so)
undefined symbol: _Znwm (./libopencfe.so)
...............


Bill Menger

unread,
Sep 1, 2019, 5:29:02 PM9/1/19
to cpseis-user
Lewis, it looks like you need /lib64/libdl.so.2, /lib64/libstdc++.so.6 and /lib64/libm.so.6.
Ubuntu uses apt-get, so I'm not exactly sure how you will get these packages, but in yum it says you need:
glibc-devel-2.17-260.el7.x86_64 (or another version that matches your Ubuntu)
libstdc++-4.8.5... from GNU standard c++ library  and/or compat-libstdc++ from compatibility standard c++ libs.

I think with the gcc/g++ development package loaded you should have all this.  I wonder if you are missing some of the development software?  What do you think?
Bill



Lewis Goss

unread,
Sep 1, 2019, 6:04:42 PM9/1/19
to cpsei...@googlegroups.com
Dear Bill:

Thanks for the guidance.  I have created soft-links for all 3 of these now:
/usr/lib64/
lrwxrwxrwx 1 root root      40 Aug 26 18:45 libstdc++.so.6 -> /usr/lib/x86_64-linux-gnu/libstdc++.so.6
lrwxrwxrwx 1 root root      32 Sep  1 16:43 libdl.so.2 -> /lib/x86_64-linux-gnu/libdl.so.2
lrwxrwxrwx 1 root root      31 Sep  1 16:44 libm.so.6 -> /lib/x86_64-linux-gnu/libm.so.6

re-made cfe, still gives same error.
% cfe -debug
/home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/wrappers/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2/jre/lib/amd64:/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2/jre/lib/amd64/server:/home/lewisgoss/cpseis/thirdparty/mpich2-1.1/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/thirdparty/fftw-2.1.5/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/thirdparty/fftw-2.1.5/platforms/lib:/home/lewisgoss/madagascar/lib://home/lewisgoss/cpseis/wrappers/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib
/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2//bin/java -ms64m -mx64m -ss256k -Djava.util.prefs.syncInterval=2000000 com.conoco.cfe.client.application.DirectApplication file:///home/lewisgoss/cpseis/opencfe/src/prefs.xml
Preferences file is 'file:///home/lewisgoss/cpseis/opencfe/src/prefs.xml'

Unable to load dynamic library opencfe
Exit OpenCFE

Bill Menger

unread,
Sep 1, 2019, 9:22:44 PM9/1/19
to cpseis-user
Argh.  Two more things to try:
1) please run ldd on $CPSEIS_INSTALL_DIR/platforms/$CPSEIS_ARCH/lib/libopencfe.so and send it.
2) try increasing memory in the cfe script (in the .../bin directory)
    It is currently"...  -ms64m -mx64m -ss256k  .."
   and could be increased.  -ms is what memory the java VM is starting with, -mx is what it can go up to.  I can't remember the -ss.  If you have a 4G memory machine, you could do something like -ms512m -mx2048m or something like that.
Bill

Bill Menger

unread,
Sep 1, 2019, 9:27:51 PM9/1/19
to cpseis-user
Here are the ldd outputs from my libraries.
image.png

Bill Menger

unread,
Sep 1, 2019, 9:32:47 PM9/1/19
to cpseis-user
I may be sending you on wild goose chases.  I just did an "nm" on my libopencfe.so to see if there were unresolved objects, and I got the following... but mine is working.
image.png
and here is my environment and build for this machine.
image.png

Lewis Goss

unread,
Sep 1, 2019, 11:30:36 PM9/1/19
to cpsei...@googlegroups.com
Dear Bill:

Here is the results of ldd as requested:
% ldd libopencfe.so
linux-vdso.so.1 =>  (0x00007ffdd5485000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4d7a7f7000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4d7a42d000)
/lib64/ld-linux-x86-64.so.2 (0x00007f4d7ac12000)

I tried increasing the memory in the cfe script in the bin directory.  No change.

Lewis Goss

unread,
Sep 2, 2019, 12:33:18 AM9/2/19
to cpsei...@googlegroups.com
Dear Bill:

I don't know if this helps, but I tried ldd with the verbose option:

% ldd -v libopencfe.so
linux-vdso.so.1 =>  (0x00007ffe7c9f9000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fa773d95000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa7739cb000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa7741b0000)

Version information:
./libopencfe.so:
libgcc_s.so.1 (GCC_3.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1
libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libgcc_s.so.1:
libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libc.so.6:
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so
.2


Bill Menger

unread,
Sep 2, 2019, 3:44:53 PM9/2/19
to cpseis-user
I will build a VM with Ubuntu 16.04 and see if I can't recreate your issues.  This has me stumped.
Bill

Bill Menger

unread,
Sep 2, 2019, 10:06:22 PM9/2/19
to cpseis-user
So far, I've discovered that the main scripts don't work worth a darn with Ubuntu.  I need to rework them to recognize the glibc, ldd, etc like they do on red hat.  Sorry for this, I don't know of anyone else doing this on Ubuntu... If they did, they gave up in frustration!
Bill

Lewis Goss

unread,
Sep 3, 2019, 7:13:03 AM9/3/19
to cpsei...@googlegroups.com
Dear Bill:

When I go to ~cpseis/opencfe/src, and do make clean followed by make
and I look very carefully at everything printed on the screen, near the bottom I see this:
one of the directories requested does not exist on my machine.  I will put in bold
...
gcc -m64 -fPIC -shared -ldl -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.3 -lsupc++ -lstdc++ -o libopencfe.so JNICfeApi.o JNICfeApiHelper.o set.o
ldd -r libopencfe.so
        linux-vdso.so.1 =>  (0x00007ffd53b64000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff98b270000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff98aea6000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff98b68b000)

undefined symbol: _ZNSt8ios_base4InitD1Ev       (./libopencfe.so)
undefined symbol: __gxx_personality_v0  (./libopencfe.so)
undefined symbol: dlopen        (./libopencfe.so)
undefined symbol: _ZdlPv        (./libopencfe.so)
undefined symbol: _Znam (./libopencfe.so)
undefined symbol: dlerror       (./libopencfe.so)
undefined symbol: dlsym (./libopencfe.so)
undefined symbol: _ZNSt8ios_base4InitC1Ev       (./libopencfe.so)
undefined symbol: _Znwm (./libopencfe.so)

Lewis Goss

unread,
Sep 3, 2019, 7:14:20 AM9/3/19
to cpsei...@googlegroups.com
Dear Bill:

Thanks for looking in to this.  I am not sure what I can do to help, but I am glad to assist in any way I can.  Happy to test things, etc.  

Lewis Goss

unread,
Sep 3, 2019, 10:00:11 PM9/3/19
to cpsei...@googlegroups.com
Dear Bill et al:

Just thinking out loud, I still have my copy of Fedora 7 unleashed.  Is there any reason to think that cpseis would install more easily under Fedora?  I moved away from Fedora myself because I was unable to successfully install madagascar under Fedora, but was easily able to do so under Ubuntu.  Just thinking.

Bill Menger

unread,
Sep 3, 2019, 10:59:17 PM9/3/19
to cpseis-user
I'm not sure.  I'm running through the Ubuntu install now.  It has (after a few script changes) maintained the correct "CPSEIS_ARCH" , compiler, mpi and has installed java and is working on mpich2.  Fedora might have similar issues.  It has been a while since I looked at anything but centos... and I'm sure each version of linux will respond slightly differently.
Bill

Lewis Goss

unread,
Sep 12, 2019, 7:41:07 PM9/12/19
to cpsei...@googlegroups.com
Dear Bill:

I am still stuck at the exact same point.  I am using Ubuntu 16.04 LTS if that matters.  Thanks.

A. Tahir Helvaci

unread,
Sep 15, 2019, 7:21:23 AM9/15/19
to cpsei...@googlegroups.com
Hi Lewis,
 
directory is something like
   /usr/lib/gcc/x86_64-redhat-linux/8/32/ in my Fedora
 
Please install gcc-c++* (both 32 bit and 64 bit version
 
I’ll  send copy of my makefile in a separate e-mail.
under /cpseis/opencfe/src/jni/makefile
 
 
Regards,
image.png
image.png
image.png

Bill Menger

unread,
Sep 16, 2019, 12:43:55 AM9/16/19
to cpseis-user, Lewis Goss
Lewis,
I added the libraries for Motif and X11 that were missing, modified the makefile to *NOT* make wrappers (useless for most people), and created a /home/data directory so that cfe had a place to put files.  I then tried cfe and got the error you were getting in Ubuntu.  NOW I can start trying to figure out why it won't work on Ubuntu!  I've kept a log of changes needed for Ubuntu, so if this works, I'll document everything and update the repo.
The error I get is "Unable to load dynamic library opencfe"
More later.
Bill

Lewis Goss

unread,
Sep 16, 2019, 9:06:13 PM9/16/19
to Bill Menger, cpseis-user
That's it.  va works, also, cfg and cbyt.  I am glad you taking this on.

% cfe -debug
/home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/wrappers/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2/jre/lib/amd64:/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2/jre/lib/amd64/server:/home/lewisgoss/cpseis/thirdparty/mpich2-1.1/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/thirdparty/fftw-2.1.5/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/thirdparty/fftw-2.1.5/platforms/lib:/home/lewisgoss/madagascar/lib://home/lewisgoss/cpseis/wrappers/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib
/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2//bin/java -ms512m -mx2048m -ss256k -Djava.util.prefs.syncInterval=2000000 com.conoco.cfe.client.application.DirectApplication file:///home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/bin/prefs.xml

Preferences file is 'file:///home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/bin/prefs.xml'
Unable to load dynamic library opencfe

Exit OpenCFE

Bjorn_Miese

unread,
Sep 25, 2019, 6:29:12 AM9/25/19
to cpseis-user


On Tuesday, September 17, 2019 at 9:06:13 AM UTC+8, Lewis Goss wrote:
That's it.  va works, also, cfg and cbyt.  I am glad you taking this on.


I was hoping somebody actually built CPSeis in Ubuntu 19.04 to see what happens.
I built it in Debian 10 ... and all the c++ applications (cbyt, va) crashing when you click on a menu. Same aborts in Debian 9 but not Debian 8.
Happened with Intel compiler icpc as well as g++
Running with debugger gdb, it traps the SIGSEGV, but then the whole Desktop froze, so couldn't investigate any further. Made me wonder if X11 is buggy in Debian and they can't be bothered fixing it.
Then going out on a (very shaky) limb, I installed gcc, g++, gfortran 4.9 from Debian 8 (2 major versions back). Got more compiler warnings, but surprisingly it built cbyt and va; and they did not crash.
This is only a Band-aid, as Debian 8 will go away in 8 months, and you won't be able to get the old gcc without a lot of trouble.

Bill Menger

unread,
Sep 25, 2019, 9:10:00 AM9/25/19
to cpseis-user
I have not been able to figure out why CFE is not loading opencfe.so on Ubuntu 16.04.  Has anyone else seen this kind of issue?  
Bill

--
You received this message because you are subscribed to the Google Groups "cpseis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpseis-user...@googlegroups.com.

Bjorn_Miese

unread,
Sep 27, 2019, 9:19:06 AM9/27/19
to cpseis-user


On Wednesday, September 25, 2019 at 9:10:00 PM UTC+8, Bill Menger wrote:
I have not been able to figure out why CFE is not loading opencfe.so on Ubuntu 16.04.  Has anyone else seen this kind of issue?  
Bill

 Ok, I had a stab at Kubuntu 18.04 (I only bother with LTS versions).
That has gcc version 7.4 and glibc 2.27, so I expected hassles.
One needs to install a bit of extra kit:
build-essentials
gfortran
xterm
csh
openssh-server
subversion
libmotif-dev
libxmu*
Now libXp was dropped by the Debian mothership, so it is missing from Ubuntu too.
You will have to get it from the archive of 14.04 trusty.
You also need to make a link from gmake to make.
I built it with gfortran, mpich2 and java 6.45
After tweaking makefiles a bit, it built, except for the java wrappers stuff.

When I try to run cbyt or va, they have Segmentation fault when clicking on
a menu, as happened in Debian 10. The only difference is that in Ubuntu, the
dropdown menu appeared for half a second, whilst in Debian, it aborted
instantly.

And also get the problem trying to run cfe with -debug:

 Unable to load dynamic library opencfe

Now I suspected the opencfe/src/jni/Makefile, which was written for Red Hat linux.
For Ubuntu/Debian, LK should be like this:

LK = gcc $(CFL) -fPIC -shared -ldl -L/usr/lib/gcc/x86_64-linux-gnu/7/ -lstdc++

That wasn't the problem.
This one mystifies me. It didn't happen in Debian, which is very similar.
libopencfe.so is where it should be, and LD_LIBRARY_PATH covers that location.
If I remove libopencfe.so from a working sytem, then I get that same error,
so it is like the file is not there, but it is.

Out of curiosity, I copied libopencfe.so from Debian build to Ubuntu --- and
then cfe will start! It was compiled with different version of gcc, so I
doubted it would help. Thus, the libopencfe.so generated in Ubuntu must be
screwed up. I have no idea where to look next, this is getting beyond my
expertise.

Bjorn_Miese

unread,
Sep 27, 2019, 10:13:47 PM9/27/19
to cpseis-user
One last experiment. Staying with Kubuntu 18.04, I installed gcc 5.5 from the repo of 16.04 xenial.
Then build everything again with gcc-5 g++-5 gfortran-5
Unfortunately cbyt, va still have segmentation fault.And cfe still can't load library opencfe.
I know a lot of people like Ubuntu, but it looks like a problem child as far as CPSEIS is concerned.

Bjorn_Miese

unread,
Sep 28, 2019, 7:53:39 PM9/28/19
to cpseis-user
cfe didn't load libopencfe.so because of undefined symbols.
If you go through install logs, look for "ldd -r libopencfe"
libdl and libstcd++ are not being linked
Seems to only be a problem with stupid effing Ubuntu (and not the very similar Debian).
To fix this, Makefile in opencfe/src/jni needs some surgery.
One has to use g++ as linker instead of gcc in order to link libstdc++
Then to load libdl, some extra options are required. The line for LK must be:

LK = g++ $(CFL) -fPIC -shared -Wl,--no-as-needed -ldl -lstdc++

I noticed that I have three copies of libstdc++.so in various places, which are all the same size.
So the $(GCCVERSION) wasn't necessary (at least in Ubuntu/Debian)
As for automating this patch, perhaps you can put this in some bash script:

grep 'ID=' /etc/os-release | grep -q buntu
if [ $? = 0 ]
then
# set Ubuntu environment variable for makefiles
fi

Lewis Goss

unread,
Sep 28, 2019, 9:41:15 PM9/28/19
to cpseis-user
Holy Cow!  Thank you.  I have cfe open.

--
You received this message because you are subscribed to the Google Groups "cpseis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpseis-user...@googlegroups.com.

bme...@h-hpcs.com

unread,
Sep 28, 2019, 9:43:14 PM9/28/19
to cpsei...@googlegroups.com

Thanks.  We might be getting closer.  Here are screen shots of my attempt to do what you suggested.

Makefile snippet:

 

-$ ldd on the new libopencfe.so

 

And unfortunately, still the same problem:

 

I’ll keep looking … we must be close.

bill

--

image001.png
image002.png
image003.png

bme...@h-hpcs.com

unread,
Sep 28, 2019, 9:43:42 PM9/28/19
to cpsei...@googlegroups.com

Congrats!  I couldn’t get it to work yet.

:<(

Bill

bme...@h-hpcs.com

unread,
Sep 28, 2019, 9:48:08 PM9/28/19
to cpsei...@googlegroups.com

Here are my unresolved objects in libopencfe.so

Bill

 

From: cpsei...@googlegroups.com <cpsei...@googlegroups.com> On Behalf Of Lewis Goss
Sent: Saturday, September 28, 2019 20:41
To: cpseis-user <cpsei...@googlegroups.com>
Subject: Re: [cpseis-user] Re: installation and setup issues under ubuntu 19.04

 

Holy Cow!  Thank you.  I have cfe open.

image001.png

Lewis Goss

unread,
Sep 29, 2019, 2:41:08 PM9/29/19
to cpseis-user
So far it is working for me, but I haven't done much yet truth be told.

I did implement the changes recommended by Bjorn:

~/cpseis/opencfe/src/jni/Makefile
ifeq "$(GLIBCVERSION)" "2.23"
        LK     = g++ $(CFL) -fPIC -shared -Wl,--no-as-needed -ldl -L/usr/lib/gcc/x86_64-redhat-linux/$(GCCVERSION)/32/ -lsupc++ -lstdc++
endif

Then make clean, make, make install in ~/cpseis/opencfe/src

% cfe -debug
/home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/wrappers/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2/jre/lib/amd64:/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2/jre/lib/amd64/server:/home/lewisgoss/cpseis/thirdparty/mpich2-1.1/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/thirdparty/fftw-2.1.5/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib:/home/lewisgoss/cpseis/thirdparty/fftw-2.1.5/platforms/lib:/home/lewisgoss/madagascar/lib://home/lewisgoss/cpseis/wrappers/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib
/home/lewisgoss/cpseis/thirdparty/jdk/platforms/Linux_x86_64_2.23_gfortran_mpich2//bin/java -ms512m -mx2048m -ss256k -Djava.util.prefs.syncInterval=2000000 com.conoco.cfe.client.application.DirectApplication file:///home/lewisgoss/prefs.xml
Preferences file is 'file:///home/lewisgoss/prefs.xml'
Client Version number is: 1.0
<BackEndLibPath value="%2Fhome%2Flewisgoss%2Fcpseis%2Fplatforms%2FLinux_x86_64_2.23_gfortran_mpich2%2Flib%2Flibcps.so"/>

int_debugset_value(-1, "BackEndLibPath" , "   " , "/home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib/libcps.so");
09-29 13:37:39

Library /home/lewisgoss/cpseis/platforms/Linux_x86_64_2.23_gfortran_mpich2/lib/libcps.so sucessfully loaded
Subroutine int_api_set_value_ was found
Subroutine int_api_put_pointers_ was found

Bjorn_Miese

unread,
Sep 30, 2019, 12:57:12 AM9/30/19
to cpseis-user
A followup: I have tested this link command:
 
LK = g++ $(CFL) -fPIC -shared -Wl,--no-as-needed -ldl -lstdc++

In Centos 6 and 7, Fedora, Debian and Suse linux. And cfe still works in all of them. So I think you can just use that in the Makefile without any testing.
I am not sure why you had to load a specific version of libstdc++
One thing is that I haven't been using your install_cpeis script. Since I have experimented with assorted platforms, I do all the steps
make depend shared static progs cfe et cetera individually to see if something goes wrong and then edit a file here and there to get it going.

bme...@h-hpcs.com

unread,
Sep 30, 2019, 8:43:10 AM9/30/19
to cpsei...@googlegroups.com

Thanks for testing this line on all the major platforms.  As soon as I can get my laptop back from a rendering job it is doing, I’ll fire up the Ubuntu VM again and do a clean make to see if it works on my Ubuntu 16.04 test platform.

Bill

 

From: 'Bjorn_Miese' via cpseis-user <cpsei...@googlegroups.com>

--

You received this message because you are subscribed to the Google Groups "cpseis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpseis-user...@googlegroups.com.

bme...@h-hpcs.com

unread,
Sep 30, 2019, 5:29:34 PM9/30/19
to cpsei...@googlegroups.com

It works great.  I rebuilt with this in the Makefile and all is well.  The specific libstdc++ references that were in that makefile were from 1999… Probably time to revise some of these files.  Thanks for your work on this.

Bill

 

From: 'Bjorn_Miese' via cpseis-user <cpsei...@googlegroups.com>
Sent: Sunday, September 29, 2019 23:57
To: cpseis-user <cpsei...@googlegroups.com>
Subject: [cpseis-user] Re: installation and setup issues under ubuntu 19.04

 

A followup: I have tested this link command:

--

Lewis Goss

unread,
Sep 14, 2022, 4:37:18 PM9/14/22
to cpsei...@googlegroups.com
Has anyone noticed that freeusp.org has gone down for several days now?  Feeling really happy I just downloaded and installed fresh on my Linux box last month. 

On Thu, Aug 15, 2019 at 7:11 PM Lewis Goss <lewis...@gmail.com> wrote:
I have tried to set-up cpseis under ubuntu 19.04.

I think I probably have some mistakes in my set-up:

I modified by .bashrc to have:
export PATH=$PATH:/home/lewisgoss/cpseis/thirdparty/mpich2-1.1/platforms/bin
export PATH=$PATH:/home/lewisgoss/cpseis
export PATH=$PATH:/home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin
export PATH=$PATH:/home/lewisgoss/cpseis/scripts
export CPSEIS_INSTALL_DIR=/home/lewisgoss/cpseis
export THIRDPARTY_DIR=/home/lewisgoss/cpseis/thirdparty
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/lewisgoss/cpseis/thirdparty/fftw-2.1.5/platforms/lib
export CPSEIS_HOME=/home/lewisgoss/cpseis

I did % install_cpseis mpich2 gfortran

This runs along for a nice little while.

When I try to run cfe I get the following message:
% cfe
Incorrect installation: Make sure you have binary directories set up in /home/lewisgoss/cpseis/platforms//bin.

I checked showenv.sh
% showenv.sh
CPSEIS_ENVIRONMENT=
CPSEIS_ARCH=
CPSEIS_INSTALL_DIR=/home/lewisgoss/cpseis
THIRDPARTY_DIR=/home/lewisgoss/cpseis/thirdparty

I tried this:
% EXE=$CPSEIS_INSTALL_DIR/etc/cpseis_bashrc.sh
[ -e $EXE ] && . $EXE mpich2 gfortran

That moved things along a little.  Now when I type
% cfe
The CPSeis Licence flashes on screen, but then I see
Exit OpenCFE

Also, if I try
% icps test01.wrk
I get along of things on screen flashing by, then:
CPS aborting for following reason:
Setup errors occurred
++++++++++++++++++++++++++++++++++

===================================================
Fatal error while running test01.wrk
===================================================



My install_cpseis.log has the following messages.  Seems to want me to define SPWSDIR variable which I have not done.
Default architecture will install.  If you want to change it, go to
/home/lewisgoss/cpseis/scripts/cpseis_bashrc.sh and change CPSEIS_ARCH.
CPSEIS_ARCH=Linux_x86_64__gfortran_mpich2
Machine is     : Linux
Architecture is: x86_64
Compiler is    : gfortran
MPI is         : mpich2
Third party dir: /home/lewisgoss/cpseis/thirdparty
Installation dir: /home/lewisgoss/cpseis
Hit Enter to continue...
...
making sps_fortran_dependencies
mpif90 -g -fPIC -fno-range-check -ffree-form -ffree-line-length-none -DLINUX -DLINUXI -I. -I/home/lewisgoss/cpseis/thirdparty/mpich2-1.1/platforms/Linux_x86_64__gfortran_mpich2/include -o /home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin/sps_fortran_dependencies  sps_fortran_dependencies.o

making spws_depend
cd /home/lewisgoss/cpseis/spws_home/making/Linux_x86_64__gfortran_mpich2 && make depend
make[1]: Entering directory '/home/lewisgoss/cpseis/spws_home/making/Linux_x86_64__gfortran_mpich2'
makefile:43: *** environment variable SPWSDIR not set.  Stop.

make[1]: Leaving directory '/home/lewisgoss/cpseis/spws_home/making/Linux_x86_64__gfortran_mpich2'
make: *** [Makefile:327: spws_depend] Error 2

cfe installed at: /home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin
/home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin
icps installed at: /home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin
/home/lewisgoss/cpseis/platforms/Linux_x86_64__gfortran_mpich2/bin
There are 0 errors in your setup. So far, so good.
Normal exit.  Hit return to exit

--
You received this message because you are subscribed to the Google Groups "cpseis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpseis-user...@googlegroups.com.

Michael

unread,
Sep 15, 2022, 4:24:32 AM9/15/22
to cpseis-user
Thanks for alerting us to that. I have downloaded USP somewhere, and the old ARCO code as well. I presume the USP mailing list has vanished too?
Last snapshot on archive.org was August 14th, which was a redirect. Last actual scrape seems to be July.
Reply all
Reply to author
Forward
0 new messages