-
Notifications
You must be signed in to change notification settings - Fork 48
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
compiling on Fedora 33 with gcc 10.2.1 #59
Comments
Hi, I just want to thank you for your time writing this. Thanks a lot!! |
Cool!! I am happy this worked out! These instructions are also true for Fedora 34 running gcc 11.2.1. |
Oh I forgot to mention, if this is useful, I tested your instructions on Opensuse tumbleweed, with gcc 11.2.1. |
Thank you!!! I was able to compile it on Ubuntu 11.3 under WSL Just to mention it could be helpfull to add ";" to "int coord_debug" in (4). |
Thanks @virogozhin! I updated the instructions. |
Thanks much for these detailed notes on what files to edit! For those running into the same compilation issues when trying to recompile Montage (v6.0) from the tar-ball on http://montage.ipac.caltech.edu/docs/download2.html, these edits allowed me to compile Montage using gcc version 11.2.0 on Ubuntu 22.04.1 LTS (kernel 5.14.0-1052). |
Thanks to all contributors - just successfully compiled Montage_6.0 on Ubuntu 22.04 using these notes. 🙏🏻 |
This allowed images to be generated
…ch-IPAC#59) and attempting to apply profiling for gprof This will help with generating the call-graphs and therefore the shape of the DAG.
I tried installing Montage under Fedora 33 under gcc-10.2.1 and encountered the same issues that previous users had identified, plus several new ones. This is the list of fixes I had to make to
have a successful compilation of Montage. Hopefully this will be of some use!
Christopher Willmer
Steward Observatory, University of Arizona.
uname -r
5.11.15-200.fc33.x86_64
gcc --version
gcc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9)
git clone https://github.com/Caltech-IPAC/Montage.git
edit ~/Montage/Montage/Makefile.LINUX such that:
add -fcommon to CFLAGS - this was noted in Issue Montage fails to build from source with gcc-10 #49)
CFLAGS = -g -I. -I../lib/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c99 -fcommon
LIBS = -L../lib -lwcs -lcfitsio -lcoord -lmtbl -lsvc
-lwww -lboundaries -lpixbounds -ltwoplane -lm
(remove -lnsl - this was noted in Issue unable to build montage #48)
Since I was not using the development version, there are more instances of -lnsl which I fixed using
find * -name 'Makefile.LINUX' | xargs sed -i 's/-lnsl//g'
Other files had to be edited:
Edit ~/Montage/lib/src/coord/./coord.h so line 4 is
extern int coord_debug;
edit ~/Montage/lib/src/coord/convertCoordinates.c:
insert at line 5:
int coord_debug
actually (see comment by @virogozhin on 2022-07-18 below)
int coord_debug ;
edit ~/Montage/util/MovingTarget/mMovingTarget.c setting line 89 to
extern long nodeCount
edit ~/Montage/util/Search/mSearch.c commenting line 75:
/*long nodeCount; */
edit all instances (94!) of ~/Montage/MontageLib/MakeHdr/montageMakeHdr.c input -> hdr_input
edit ~/Montage/MontageLib/Subimage/montageSubimage.c :
line 93 -> /* int haveBlank */
and insert at line 168
int haveBlank; (this will be inside braces of struct mSubimageReturn)
edit ~/Montage/MontageLib/TANHdr/montageTANHdr.c:109 by changing epoch -> char_epoch:
original line # change
110 char char_epoch [80];
1251 strcpy(char_epoch, "");
1348 strcpy(char_epoch, value);
1371 if(haveEpoch) printf("epoch = [%s]\n", char_epoch);
1679 sprintf(temp, "EPOCH = %s", char_epoch );
With that I have a working version of Montage!
The text was updated successfully, but these errors were encountered: