TinkerTools / tinker

Tinker: Software Tools for Molecular Design
https://dasher.wustl.edu/tinker/
Other
130 stars 61 forks source link

8.8.2 fails to build: induce.f:(.text+0x19d88): undefined reference to `lusolve_' #70

Closed yurivict closed 3 years ago

yurivict commented 3 years ago

The FreeBSD port fails to build:

gfortran -Ofast -msse -msse2 -mfpmath=sse -fopenmp -static-libgcc -o gda.x  -L/wrkdirs/usr/ports/science/tinker/work/tinker/fftw/lib gda.o libtinker.a  -lfftw3_threads -lfftw3; strip gda.x
/usr/local/bin/ld: libtinker.a(induce.o): in function `ulspred_': 
induce.f:(.text+0x19d88): undefined reference to `lusolve_'
/usr/local/bin/ld: induce.f:(.text+0x19da8): undefined reference to `lusolve_'
collect2: error: ld returned 1 exit status
jayponder commented 3 years ago

Hi. This is strange, as it appears that the lusolve.o object code (compiled from lusolve.f source) is not in the Tinker object library, libtinker.a. Can you do an "ar -t libtinker.a" on this object library created during the build procedure to see if lusolve.o is present?

The lusolve routine is a recent addition to Tinker, within the past several weeks. Are you sure you aren't using a Makefile from some previous version of Tinker while trying to build the latest source? That seems the most likely explanation for the problem you are seeing.

Also, what version of the OS and what version of the GNU compilers (gfortran) are you using? We routinely build Tinker, including the very latest version that you are trying to build, on Ubuntu 20.04 and an old CentOS system. We do not see this problem on either of those Linux systems. I've checked the Makefile distributed with Tinker that we use for routine builds, and it appears to contain "lusolve" in all the correct places.

yurivict commented 3 years ago

Can you do an "ar -t libtinker.a" on this object library created during the build procedure to see if lusolve.o is present?

No, it is not present.

Are you sure you aren't using a Makefile from some previous version of Tinker while trying to build the latest source?

I use this tarball https://dasher.wustl.edu/tinker/downloads/tinker-8.8.2.tar.gz Is this a correct tarball?

Also, what version of the OS and what version of the GNU compilers (gfortran) are you using?

I use FreeBSD 12.2 gfortran is installed by gcc9-9.3.0_1

jayponder commented 3 years ago

Since you posted this on Github, I assumed you were using the Github version of Tinker where you posted this issue. The version of Tinker at dasher.wustl.edu is updated only occasionally, and is not kept in sync with the Github version which is updated very frequently. I just checked the dasher.wustl.edu version, and it looks like the lusolve routine is missing from the Makefile in the tarball. I'll get that fixed soon. Thanks for noting the problem.

I might suggest that going forward you switch to building from the latest Github Tinker "release" branch. The only advantage of the dasher.wustl.edu site is that we keep pre-built executables for Linux/Mac/Windows available for download from that site.

yurivict commented 3 years ago

But there can't be several releases with the same release version number. Somebody has uploaded this tarball there.

Dos this mean that you keep updating the tarball after it is released?

yurivict commented 3 years ago

8.8.2 isn't tagged in this GitHub repository.

jayponder commented 3 years ago

The current version on dasher.wustl.edu is 8.8.2. I will update it to version 8.8.3 on that site when I patch the Makefile bug you reported. I'll try to get around to this today, but I can't make any promises. Unless it's something really trivial, I do not change the dasher.wustl.edu tarball after it is released as a "version".

We do not "version number" the Github repos. There are Github commits made to Tinker almost every day, often many per day, and we would have micro version numbers in the thousands if we gave a new version number to every micro change.

If you want an "official" version numbered Tinker release, then perhaps you should stay with the dasher.wustl.edu releases. For better or worse, the dasher.wustl.edu and Github versions are just not going to be the same. The intent is for the dasher.wustl.edu version to be a more "long term" release, while Github is the "development" code. Unfortunately, you encountered a bug in the recent update to 8.8.2 on dasher.wustl.edu. Sorry for your trouble. We are just a small handful of academic scientists, and we do the best we can to keep everything working...

yurivict commented 3 years ago

So the problem is that 8.8.2 is broken with a missing file. I'll wait for 8.8.3.

I can't just always take the top of the master branch for the port if the repo isn't tagged with the version because I don't know how is it related to the tarball release.

jayponder commented 3 years ago

Yes. As I said, I'll patch the dasher.wustl.edu version and update the version to 8.8.3. It should be up within the next 12-24 hours at most.

It took me awhile to realize that you were doing a port for FreeBSD, and didn't just want to use Tinker... I understand now. So, you probably do want to work off of the versioned releases posted to dasher.wustl.edu.

jayponder commented 3 years ago

The dasher.wustl.edu/tinker site is updated to version 8.8.3, which is essentially the current Github version. Everything is updated to 8.8.3 except the Java GUI (FFE), and that may take me a few days as it's a lot more work.

I think this version may even build correctly from the tarball :) Let me know if you have any further problems.

yurivict commented 3 years ago

I've updated the FreeBSD port.

Thank you!