hercules-390 / hyperion

Hercules 390
Other
248 stars 67 forks source link

Hyperion configure should check for softfloat presence #170

Closed jphartmann closed 7 years ago

jphartmann commented 7 years ago
  CC     hsys.lo
  CCLD   libhercs.la
/usr/bin/ld: cannot find -lSoftFloat

Sure, BUILDING says to install it.

Configure could also check for the proper location and issue a meaningful message.

srorso commented 7 years ago

Yeah, config should check. And allow:

--enable-s3fh-altdir=

Or . Or both.

I dread this but it's time to gird my loins and beat configure.ac into submission.

emersonrsantos commented 7 years ago

Why not just incorporate softfloat inside the main tree as in hercules-3.12 and spinhawk?

jphartmann commented 7 years ago

Softfloat is not in the main tree a. because it really is an external package and b. to slim down Hyperion. In theory the original package owner might pick up Steve's modification, at which point we can just change the clone-from URL and Steve is out of the loop (sure it is rather unlikely in this case).

Once the process is better understood, this will no doubt become transparent.

jphartmann commented 7 years ago

This Ubuntu LTS 14.04 offers only this level of CMAKE:

CMake 3.2 or higher is required.  You are running version 2.8.12.2

I haven't followed CMAKE; presumably that is a hard requirement?

srorso commented 7 years ago

I built CMake 3.7.1 from source on Win-10 bash without difficulty. Although building it under Debian in a VirtualBox, 32 or 64, took a little less time. 3.2 or better is a hard requirement; Enrico's CMakeLists.txt requires stuff not available before 3.2.

emersonrsantos commented 7 years ago

This Ubuntu LTS 14.04 offers only this level of CMAKE:

CMake 3.2 or higher is required. You are running version 2.8.12.2

CMake is 2.8.12.2 also on latest CentOS.

srorso commented 7 years ago

I have built CMake 3.7.1 from source using CMake.org's bootstrap process on those systems that lack an uplevel CMake by following the directions on CMake.org. I have built SoftFloat 3a For Hercules on Debian 8.6 32 and 64, CentOS 7, and Win-10 Bash (Ubuntu 14.4), all of which required a CMake build from source. I also built on Leap 42.2, which has a software repo with a CMake > 3.2.

The bootstrap build was clean on all systems. Takes a little time but works exactly as CMake.org advertises.

So ./bootstrap of CMake will get you there.

jphartmann commented 7 years ago

Installing CMAKE 3.7 on UNIX:

wget https://cmake.org/files/v3.7/cmake-3.7.1.tar.gz
tar -xf cmake-3.7.1.tar.gz
cd cmake-3.7.1/
./bootstrap --prefix=$HOME

I then get message CMake has bootstrapped. Now run make. It took quite a while on my Atom processor

I find no installation instructions on the CMAKE web site; you clearly have to "knnow" to use the bootstrap script. It looks remarkably like configure.

srorso commented 7 years ago

Updated BUILDING.txt in SoftFloat 3a For Hercules to include instructions on bootstrapping CMake. I thought when drafting BUILDING.txt that the process was clearly documented by cmake, but after retracing my steps through the readme, I agree that it was not. My apologies for the confusion.

Work continues on the other component of this issue, namely that configure should at a minimum fail gracefully if SoftFloat 3a For Hercules cannot be found. --enable-s3fh-altdir= will follow that.

jphartmann commented 7 years ago

In your current scheme the hercules code must be in $(uname -m)/hyperion, right? I think there is a requirement for any number of build directories; after all, that is one of the benefits of out-of-source builds. On the other hand I don't see any big need for multiple softfloat builds, but I suppose there will always be a need for "another one", so that means any number too.

srorso commented 7 years ago

$(uname -m) is a recommendation, not a requirement. The open source system build process is not sensitive to the name, unlike the Windows build process, which is. The current open source build does require the hyperion build directory to be in the same directory as the s3fh directory.

My next commit to Hyperion will make configure.ac much more verbose about s3fh and what to do about it. Coded, regression testing remains.

I hope there is no big need for additional SoftFloat builds, but I do see a need for at least some, as the future includes developing a few additional rounding modes for PFPO. And there is always the "upgrade" to 3b. :-)

Back to testing configure.ac. Then on to Makefile.am.

srorso commented 7 years ago

Commit cb43797 improves the messages issued during configure to a) detect a missing softfloat.h header, most often due to a missing SoftFloat 3a For Hercules, and b) to point builders to the SoftFloat 3a For Hercules repository for build instructions.

This commit does not "fix" the underlying issue; on an open source system, one must still build SoftFloat 3a For Hercules before building Hercules. But at least configure now makes an effort to tell you that.

If you have experienced this problem, please re-clone, try again, and let us know what you experience.

And commit ba9a0d4 to SoftFloat-3a adds verbiage to BUILDING.txt to explain how to bootstrap CMake from source.

Many thanks for your patience and careful problem reporting. We will leave this issue open for a bit pending feedback.