Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation breaks with make 4.3 #707

Closed
meanjollies opened this issue Apr 2, 2020 · 6 comments
Closed

Compilation breaks with make 4.3 #707

meanjollies opened this issue Apr 2, 2020 · 6 comments

Comments

@meanjollies
Copy link

meanjollies commented Apr 2, 2020

make 4.3 was released in January and appears to have a few backward-compatibility issues that might account for this. As such, mothur now fails to compile:

$ make
g++ -O3 -std=c++11 -pthread -DVERSION="\"1.44.0\"" -DUSE_READLINE -I.  -I source/calculators/  -I source/chimera/  -I source/classifier/  -I source/clearcut/  -I source/commands/  -I source/communitytype/  -I source/datastructures/  -I source/engines/  -I source/metastats/  -I source/read/  -I source/svm/   -c -o source/calculators/accuracy.o source/calculators/accuracy.cpp
In file included from source/datastructures/sabundvector.hpp:4,
                 from source/calculators/calculator.h:5,
                 from source/calculators/accuracy.hpp:12,
                 from source/calculators/accuracy.cpp:9:
source/datastructures/datavector.hpp:4:10: fatal error: mothurout.h: No such file or directory
    4 | #include "mothurout.h"
      |          ^~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:139: source/calculators/accuracy.o] Error 1

Please let me know if there's any other information I can provide, and thank you for maintaining mothur.

@mothur-westcott
Copy link
Contributor

Hmm... I'm not seeing that issue building with 4.3. Could you tell me more about your system? Have you considered using our prebuilt binaries?

@meanjollies
Copy link
Author

Sure, this is on Arch Linux. If I roll back my make version to 4.2.1, it succeeds. Regarding prebuilt binaries, I'm the package maintainer for mothur in the Arch User Repository, so I have an interest in making sure it builds from source.

@mothur-westcott
Copy link
Contributor

I built with make 4.3 on Fedora. I haven't worked with Arch Linux before, so I don't have any insights about the system.

The compile error seems to indicate the mothurout.h file can't be found. mothurout.h should be located in the source folder. Can you confirm it's there?

@meanjollies
Copy link
Author

After some digging, I found that -I source/ is getting left out of CXXFLAGS. This is also happening on Ubuntu. Funnily enough, using make 4.3 on RHEL 7 and RHEL 8 causes it to get included, much like Fedora. Not sure what sort of dependency could cause this difference. My makefile-fu is terrible, but if I modify subdirs like so: subdirs := $(sort $(dir $(filter-out $(skipUchime), source/, $(wildcard source/*/)))) - it works.

@mothur-westcott
Copy link
Contributor

Great! Thanks for helping us track this down. I will add the change to our makefile.

@jowodo
Copy link

jowodo commented Feb 8, 2023

I encountered this issue Oracle Linux 8.7 (based on Redhat 8.7) with make version 4.2.1.
I resolved it with:

sed -i -e "1i CXXFLAGS=-Isource" Makefile 
make 

the sed commands prepends a line to the Makefile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants