hercules-390 / hyperion

Hercules 390
Other
248 stars 67 forks source link

hercules 4x from git does not compile and does not install on FreeBSD 12-CURRENT #216

Closed gurucubano closed 7 years ago

gurucubano commented 7 years ago

$ uname -a FreeBSD c720-r314251 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r314251: Sat Feb 25 17:14:40 CET 2017 root@r303343-amd64:/usr/obj/usr/src/sys/GENERIC amd64

$ git clone https://github.com/hercules-390/hyperion.git $ cd hyperion $ ./1Stop ... the result are missing shared libs: CCLD cckdcdsk ./.libs/libherc.so.0.0: undefined reference to decNumberPlus ./.libs/libherc.so.0.0: undefined reference to decimal128ToNumber ./.libs/libherc.so.0.0: undefined reference to decNumberQuantize

Faking the system environment to 11.0-RELEASE with:

$ env | grep UNAME UNAME_r=11.0-RELEASE UNAME_v=FreeBSD 11.0-RELEASE #0 r314251: Sat Feb 25 17:14:40 CET 2017 root@r303343-amd64:/usr/obj/usr/src/sys/GENERIC UNAME_U=1100022 $ uname -a FreeBSD c720-r314251 11.0-RELEASE FreeBSD 11.0-RELEASE #0 r314251: Sat Feb 25 17:14:40 CET 2017 root@r303343-amd64:/usr/obj/usr/src/sys/GENERIC amd64

makes the compilation fine but the installation does not work:

# cd ../amd64/hyperion # make install ... /usr/bin/install -c .libs/libhercs.so.0.0 /usr/local/lib/libhercs.so.0.0 /usr/bin/install -c .libs/libhercs.lai /usr/local/lib/libhercs.la libtool: install: warning: relinking libhercu.la (cd /usr/home/guru/amd64/hyperion; /bin/sh ./libtool --mode=relink gcc -g -W -Wall -O3 -g -g3 -ggdb3 -O3 -export-dynamic -no-undefined -avoid-version -Wl,--warn-common -o libhercu.la -rpath /usr/local/lib codepage.lo hdl.lo hexdumpe.lo hostinfo.lo hscutl.lo hscutl2.lo hsocket.lo hthreads.lo logger.lo logmsg.lo memrchr.lo parser.lo pttrace.lo version.lo ltdl.lo -lrt -lz -lm -pthread -lbz2 -L/home/guru/amd64/s3fh/lib -lSoftFloat libhercs.la -lrt -lz -lm -pthread -lbz2 -L/home/guru/amd64/s3fh/lib -lSoftFloat ) gcc -shared .libs/codepage.o .libs/hdl.o .libs/hexdumpe.o .libs/hostinfo.o .libs/hscutl.o .libs/hscutl2.o .libs/hsocket.o .libs/hthreads.o .libs/logger.o .libs/logmsg.o .libs/memrchr.o .libs/parser.o .libs/pttrace.o .libs/version.o .libs/ltdl.o -Wl,--rpath -Wl,/usr/local/lib -L/home/guru/amd64/s3fh/lib -L/usr/local/lib -lhercs -lrt -lz -lm -lbz2 -lSoftFloat -Wl,--warn-common -Wl,-soname -Wl,libhercu.so.0.0 -o .libs/libhercu.so.0.0 /usr/local/bin/ld: cannot find -lhercs collect2: error: ld returned 1 exit status libtool: install: error: relink libhercu.la with the above command before installing it *** Error code 1

Please let me know if you need additional output or logs.

gurucubano commented 7 years ago

El día lunes, abril 10, 2017 a las 07:38:47p. m. -0700, Stephen Orso escribió:

Hi Matthias:

I installed gcc 4.9.4 on my 5-Apr snapshot, and I got the packages I expected. I did not get gfortran, so I suspect you are building gcc from source. And that's fine. But it means I cannot do functional testing of the build changes. I can and shall do the regression testing on Ubuntu, Debian, CentOS, Leap, Windows Subsystem for Linux, and of course FreeBSD. Native Windows uses a different build process.
...

Hi Steven,

Re/ the gcc-4.9.4 && Fortran problem: Yes, I compile all my used ports on a potent build host (a Dell PowerEdge r210, 8 CPU, 16 GB RAM) by my own from source in a dedicated jail (poudriere is its name in FreeBSD) to install the resulting packages on the laptops, netbooks, VMs I volunteer to support. I do not remember having set any special options for the port lang/gcc49 and that's why I checked out its option file in the poudriere oven this morning. Nothing. So the default options from the ports' Makefile applied which are:

OPTIONS_DEFINE= BOOTSTRAP OPTIONS_DEFINE_i386= JAVA OPTIONS_DEFINE_amd64= JAVA OPTIONS_DEFINE_powerpc64= JAVA OPTIONS_DEFAULT= BOOTSTRAP OPTIONS_DEFAULT_i386= JAVA OPTIONS_DEFAULT_amd64= JAVA OPTIONS_EXCLUDE_DragonFly= JAVA BOOTSTRAP_DESC= Build using a full bootstrap

The same Makefile declares about LANGUAGES:

LANGUAGES:= c,c++,objc,fortran

and the resulting package information is:

$ pkg info -F gcc-4.9.4.txz

gcc-4.9.4 Name : gcc Version : 4.9.4 Origin : lang/gcc Architecture : freebsd:12:x86:64 Prefix : /usr/local Categories : lang java Licenses : GPLv3 and GPLv3RLE Maintainer : gerald@FreeBSD.org WWW : http://gcc.gnu.org/ Comment : GNU Compiler Collection 4.9 Options : BOOTSTRAP : off JAVA : on Shared Libs required: libgmp.so.10 libmpc.so.3 libmpfr.so.4 Shared Libs provided: libgfortran.so.3 libssp.so.0 libgcj-tools.so.15 libcilkrts.so.5 libgij.so.15 libstdc++.so.6 libjvm.so libitm.so.1 libgcj.so.15 libgcc_s.so.1 libquadmath.so.0 libjavamath.so liblto_plugin.so.0 libgomp.so.1 libatomic.so.1 libobjc.so.4 Annotations : cpe : cpe:2.3:a:gnu:gcc:4.9.4:::::freebsd12:x64 Flat size : 374MiB Description : GCC, the GNU Compiler Collection, supports a number of languages. This port installs the C, C++, Fortran and Java front ends as gcc49, g++49, gfortran49, and gcj49, respectively.

It can be used interchangibly with the lang/gcc49 port, which tracks GCC 4.9 releases, and will move to lang/gcc5 and later over time.

WWW: http://gcc.gnu.org/

Gerald Pfeifer gerald@FreeBSD.org

(Btw: Now as I see this, I do not fully understand why BOOTSTRAP is 'off', and the poudriere oven is at home, i.e. I can not check the ports build log file right now.)

Anyway, why your pkg has no Fortran? Could you run the same 'pkg info -F filename' cmd?.

Re/ the test of your branch, I will look for a system here with the same version and with gcc49 installed, but which never has seen any hercules software, i.e. also nothing below /usr/local from hercules ... Stay tuned.

Good Morning

matthias
gurucubano commented 7 years ago

El día lunes, abril 10, 2017 a las 07:38:47p. m. -0700, Stephen Orso escribió:

So could I impose on you to run a functional check on a FreeBSD 12 system that still has gfortran installed?

Hello Steve,

I did the tests on a clean system and will attach the log of the compile, installation and first run.

HIH

matthias
gurucubano commented 7 years ago

Xterm.log.amd64-r314251.2017.04.11.08.01.12.1234.gz

srorso commented 7 years ago

Hi Matthias:

Changes committed to Hercules.

I installed gcc 4.9.4 from FreeBSD binaries. I removed them and built gcc 4.9.4 from source using FreeBSD ports. Still no gfortran. But your functional test is good enough for me.

I'm sorry this took so long to resolve, and I thank you for reporting this. I learned a great deal.

Best Regards, Steve Orso

wrljet commented 7 years ago

Steve, just a comment to give you a smile... I built gcc 6.2 from source on the Raspberry Pi Zero and it took 5 days of grinding!

Bill

gurucubano commented 7 years ago

El día martes, abril 11, 2017 a las 01:33:42p. m. -0700, Stephen Orso escribió:

Hi Matthias:

Changes committed to Hercules.

Hi Steve,

Thanks for fixing/closing this issue. We did some nice work together, I think.

I installed gcc 4.9.4 from FreeBSD binaries. I removed them and built gcc 4.9.4 from source using FreeBSD ports. Still no gfortran. But your functional test is good enough for me.

Re/ the gcc49 && Fortran: I deleted the (my compiled) gcc49 pkg again and fetched the gcc49 pkg from the FreeBSD master side:

pkg delete gcc-4.9.4

Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 2 packages (of 0 packages in the universe):

Installed packages to be REMOVED: gcc-4.9.4 kBuild-0.1.9998_6

Number of packages to be removed: 2

The operation will free 376 MiB.

Proceed with deinstalling packages? [y/N]: y [1/2] Deinstalling kBuild-0.1.9998_6... [1/2] Deleting files for kBuild-0.1.9998_6: 100% [2/2] Deinstalling gcc-4.9.4... [2/2] Deleting files for gcc-4.9.4: 100%

ls -l /usr/local/bin/fort

ls: No existe correspondencia.

fetch http://pkg.freebsd.org/FreeBSD:12:amd64/latest/All/gcc49-4.9.4_1.txz

ls -l gcc49-4.9.4_1.txz

-rw-r--r-- 1 guru wheel 76357348 12 abr. 07:09 gcc49-4.9.4_1.txz

pkg info -F gcc49-4.9.4_1.txz | tail

cpe            : cpe:2.3:a:gnu:gcc:4.9.4:::::freebsd12:x64:1

Flat size : 372MiB Description : GCC, the GNU Compiler Collection, supports a number of languages. This port installs the C, C++, Fortran and Java front ends as gcc49, g++49, gfortran49, and gcj49, respectively.

WWW: http://gcc.gnu.org/

Gerald Pfeifer gerald@FreeBSD.org

pkg install gcc49-4.9.4_1.txz

Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Checking integrity... done (0 conflicting) The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED: gcc49: 4.9.4_1

Number of packages to be installed: 1

The process will require 372 MiB more space.

Proceed with this action? [y/N]: y [1/1] Installing gcc49-4.9.4_1... Extracting gcc49-4.9.4_1: 100% Message from gcc49-4.9.4_1: To ensure binaries built with this toolchain find appropriate versions of the necessary run-time libraries, you may want to link using

-Wl,-rpath=/usr/local/lib/gcc49

For ports leveraging USE_GCC, USES=compiler, or USES=fortran this happens transparently.

ls -l /usr/local/bin/fort

-r-xr-xr-x 2 root wheel 826224 9 abr. 15:39 /usr/local/bin/gfortran49 -r-xr-xr-x 2 root wheel 826224 9 abr. 15:39 /usr/local/bin/x86_64-portbld-freebsd12.0-gfortran49

(Have you seen my off-list mail re/ the tape. If you do not know anything or can not answer it, it's fine. I hereby just wanted to make sure you have seen it. Thanks.)

Hasta la próxima vez, un abrazo.

matthias

-- Matthias Apitz, ✉ guru@unixarea.de, ⌂ http://www.unixarea.de/ ☎ +49-176-38902045

wrljet commented 7 years ago

Have you guys considered the Environment Modules package? It manages various installations of the same program. Such has having 4 different gcc's installed. I find it to be very handy.

https://en.wikipedia.org/wiki/Environment_Modules_(software)

Takes a bit of fiddling to get it built/installed, though.

Bill