Hi Larry and Alex,
I was actually able to get everything to compile without errors! It compiled 64-bit too. On FreeBSD, you get linker errors looking for the 32-bit libraries if you try to compile in 32-bit. I don't know if you can install the 32-bit libraries separately or not. Here is a summary of what I did:
1. Symlink gcc8, g++8, and gfortran8 to gcc, g++, and gfortran.
2. Used bash instead of FreeBSD's /bin/sh to stay compatible with ew_linux.bash
3. Edited ew_linux.bash to change the earthworm install directory and added -Wl,-rpath=/usr/local/lib/gcc8 to the gfortran options so fortran programs are linked correctly. See
here for my issue I had with another program.
4. Used Larry's commands after downloading the latest svn version:
export EW_REV=7917
ARCH=`uname -m`
EW_INSTALL_HOME="`pwd`" \
EW_INSTALL_VERSION=earthworm-7.10-${EW_REV} \
EW_INSTALL_BITS=64 \
source earthworm-7.10-${EW_REV}/environment/ew_linux.bash
5. after gmake clean_unix and gmake clean_bin_unix, I ran gmake unix. Here is a summary of the changes I made to files that produced errors:
A. Added #include <netinet/in.h> and #include <arpa/inet.h> to the following files containing #include <netdb.h>:
earthworm-7.10-7917/include/platform.h
earthworm-7.10-7917/src/display/webswave/mongoose.c
earthworm-7.10-7917/src/seismic_processing/localmag/lm_ws.c
earthworm-7.10-7917/src/seismic_processing/gmew/gm_ws.c
earthworm-7.10-7917/src/reporting/ewhttpd/mongoose.c
earthworm-7.10-7917/src/reporting/moleserv/mongoose.c
earthworm-7.10-7917/src/archiving/mole/mysql-connector-c-6.0.2/mysys/my_pthread.c
earthworm-7.10-7917/src/archiving/mole/mysql-connector-c-6.0.2/mysys/my_gethostbyname.c
earthworm-7.10-7917/src/archiving/mole/mysql-connector-c-6.0.2/mysys/my_net.c
earthworm-7.10-7917/src/libsrc/libdali/parse_ip_address.c
earthworm-7.10-7917/src/libsrc/libdali/portable.h
earthworm-7.10-7917/src/libsrc/unix/tcpaccept_ew.c
earthworm-7.10-7917/src/libsrc/unix/setuptcpclient_ew.c
earthworm-7.10-7917/src/libsrc/unix/setuptcpserver_ew.c
earthworm-7.10-7917/src/libsrc/lib330/platform.h
I just used grep to locate which files containing #include <netdb.h>. I think the ones that affected the build were in libsrc and include/platform.h
B. Made the following modifications to the files:
earthworm-7.10-7917/src/libsrc/unix/transport.c
comment out line 984 and 1898
earthworm-7.10-7917/src/libsrc/unix/remote_copy.c
line 40 wait.h to sys/wait.h
earthworm-7.10-7917/src/libsrc/unix/copyfile.c
line 42 wait.h to sys/wait.h
earthworm-7.10-7917/src/libsrc/util/startstop_unix_generic.c
replace O_NDELAY with O_NOCTTY on two lines and __WALL with P_ALL on multiple lines
earthworm-7.10-7917/src/libsrc/qlib2/qtime.c
line 1784 add || defined(__FreeBSD__) to end of line
earthworm-7.10-7917/src/data_exchange/getfile_ew/getfile_socket.c
comment out lines 55, 56, 57
earthworm-7.10-7917/src/reporting/ewhttpd/mongoose.c
line 1587 and 3340 replace PF_INET with AF_INET
earthworm-7.10-7917/src/seismic_processing/evanstrig/mutils.c and mutils.h
rewrite time functions to use gettimeofday instead of the old ftime
6. gmake unix and everything compiled without any errors.
Attached is my log. I'll need to create the diff file and also test earthworm now that everything is compiled.
More to come.
Thanks Larry.
Jonathan