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

Use mkfloat.sh in mkpkg #10

Merged
merged 1 commit into from
May 22, 2019
Merged

Use mkfloat.sh in mkpkg #10

merged 1 commit into from
May 22, 2019

Conversation

olebole
Copy link
Member

@olebole olebole commented May 16, 2019

IRAF now uses /bin/sh compatible scripts instead of (t)csh. Since the shell name is encoded in the suffix, this needs to be changed in mkpkg.

Closes #9

@vall33
Copy link

vall33 commented May 16, 2019

maybe this is only part of the problem. The instructions are incomplete as one needs to source $hlib/irafuser.csh in order to compile. However, irafuser.csh has this line:

setenv XC_CFLAGS "${CPPFLAGS} ${CFLAGS} -I${iraf}include"

I do not have CPPLAGS and CFLAGS variable defined and nothing after that line is sources. I get lots of complains about undefined HSI_CF. Could this be a problem for compiling IRAF as well? I managed to compile it, but when running the tests, 2 are skipped and one fails.

Also mkpkg gives these two messages:

envinit: cannot open /home/data/iraf/extern/fitsutil/fitsutillib/zzsetenv.def' Warning, mkpkg line 0: cannot open fitsutil$lib/mkpkg.inc'

in particular there is no fitsutillib directory and thus zzsetenv.def is not read

@olebole
Copy link
Member Author

olebole commented May 16, 2019

Thank you very much for looking deeper into the package build!
Do you use (t)csh or bash? In the latter case (which works now for IRAF), you should source unix/hlib/irafuser.sh instead.

@olebole
Copy link
Member Author

olebole commented May 16, 2019

when running the tests, 2 are skipped and one fails.

One test (for IRAF) usually xfails, where the x means "expected failure". Is this the case?

@vall33
Copy link

vall33 commented May 16, 2019

it is xfalis I think.

I use tcsh, but I will try with bash now

@olebole
Copy link
Member Author

olebole commented May 16, 2019

For tcsh, source irafuser.csh terminates on the first error, which is the case here (need to fix that, thanks for reporting!). For the moment, you should either switch to bash, or define the undefined variables to be empty.

@olebole
Copy link
Member Author

olebole commented May 16, 2019

see iraf-community/iraf#86 for a fix of the aborting tcsh source.

@vall33
Copy link

vall33 commented May 16, 2019

The complier problem is now solved, but I still get:

envinit: cannot open /home/data/iraf/extern/fitsutil/fitsutillib/zzsetenv.def' Warning, mkpkg line 0: cannot open fitsutil$lib/mkpkg.inc'

It seems 'fitsutillib' should be just 'lib', but I cannot figure out where the error comes from. The directory is correctly set in extern.pkg

@olebole
Copy link
Member Author

olebole commented May 16, 2019

You should (not written in the README yet) do a setenv fitsutil <path>/ (tcsh) resp. export fitsutil=<path>/ (bash). I'll add this there (in some other external packages it is described)

@vall33
Copy link

vall33 commented May 16, 2019

that worked. It is indeed described in the mscred package. Thanks for the help

@olebole
Copy link
Member Author

olebole commented May 20, 2019

Back to the original PR: I think this would be a good opportunity to remove a bad-style solution from IRAF: for the user, the script language of mkfloat.(c)sh does not matter at all (as long as the script interpreter is installed). So, the ending should be removed completely. If in some future the script is rewritten in Python, this shall not cause another incompatibility then.
So, I will rename the script to hlib$mkfloat without any suffix, and adjust the external packages accordingly.

IRAF now uses `/bin/sh` compatible scripts instead of (t)csh, and the
suffix is removed from the file name.

Reference: iraf-community/iraf#87
@olebole olebole merged commit 67ec1c3 into iraf-community:master May 22, 2019
@olebole olebole deleted the mkfloat.sh branch May 22, 2019 15:12
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

Successfully merging this pull request may close these issues.

missing mkfloat.csh
2 participants