Skip to content

label_date.pro is missing from /usr/share/gnudatalanguage/lib #1649

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

Closed
jmyoshii opened this issue Oct 13, 2023 · 11 comments
Closed

label_date.pro is missing from /usr/share/gnudatalanguage/lib #1649

jmyoshii opened this issue Oct 13, 2023 · 11 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed idl/gdl-only No C++ skills needed

Comments

@jmyoshii
Copy link

I installed GDL 0.9.9 on Ubuntu 20.04. Running a routine produced the error message "Function not found: LABEL_DATE".

label_date.pro is not in /usr/share/gnudatalanguage/lib even though I found it in the 'src' directory in the github.

@jmyoshii
Copy link
Author

jmyoshii commented Oct 13, 2023

Oops, it is in 'src/pro' in the github. I clicked on the link to the code, copied and pasted to the file 'label_date.pro' in my user directory, then used sudo to copy it to /usr/shar/gnudatalanguage/lib.

When I try

GDL>  date_label = LABEL_DATE(DATE_FORMAT =  '%Y') 

I get error messages

% Warning: Assignment to loop variable detected.
% Compiled module: LABEL_DATE.
% LONG: Variable is undefined: X
% Error occurred at: LABEL_DATE          73 /usr/share/gnudatalanguage/lib/label_date.pro

@alaingdl
Copy link
Contributor

  1. I strongly advice you to move to current 1.0.3, because it is not easy to maintain very old versions to check such problems
  2. I did run the first example in IDL doc (in GDL 1.0.1 & 1.03) and it is working nicely for me, with the limitation that TIMEGEN should be in the path too (timegen.pro available on scisoft4 @ ESO)

@GillesDuvert
Copy link
Contributor

"Our" label_date.pro is coming from the COBE experiment and claimed as free. (However it contains explicit contributions of "DMS, RSI. April, 1993. Written." ??) . It is probably old WRT the current status of IDL's version.
Indeed there seem to be a problem using this procedure, however it has worked in the past years as it is used in the TICKFORMAT='LABEL_DATE' option for plots.
Probably an easy bug.

@GillesDuvert
Copy link
Contributor

And 'label_date' is installed along the other procedures.

@GillesDuvert GillesDuvert added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers idl/gdl-only No C++ skills needed labels Oct 13, 2023
@GillesDuvert
Copy link
Contributor

I mean, it is installed when GDL is compiled by the user. It may not be installed using a distributed (Ubuntu...) version as they may keep procedures in a separate package of unknown name.

@jmyoshii
Copy link
Author

I think I need to build the source code, then. Version 0.9.9 is the one offered in Synaptic Package Manager. I will give that a try. Thank you!

@jmyoshii
Copy link
Author

I installed the MacPorts version on a Mac -- it is version 1.0.0-rc3. No label_date.pro in /opt/local/share/gnudatalanguage/lib there too.

I think my lesson is to just download GDL directly, rather than going through package managers. Thank you again.

@jmyoshii
Copy link
Author

I followed the instructions at "GDL on Linux" for the build_gdl.sh script. Even with timegen.pro as alaingdl suggested,


GDL> date_label = label_date(date_format = '%Y')
% Warning: Assignment to loop variable detected.
% Compiled module: LABEL_DATE.
% LONG: Variable is undefined: X
% Execution halted at: LABEL_DATE 73 /home/jmyoshii/label_date.pro
% $MAIN$


I attempted to build GDL on the iMac (running Sonoma) using way 1 at "But if you prefer doing it the hard way:"... the prep stage had errors and the configure stage failed. But the v1.0.3 .dmg file worked (an earlier version that I downloaded failed to run), and the GDL window pops up. I get the same label_date.pro error as on Linux.

This confirms GillesDuvert's statement that there is a problem with label_date.pro.

Thank you for all the hard work you do to improve GDL!

@alaingdl
Copy link
Contributor

(I cannot reproduce "exactly" your bug but may just a version issue)

OK, clearly "our" LABEL_DATE don't work now as the IDL one's 😞
Especially DATE_FORMAT= keyword is not managed in the code !

A.

@GillesDuvert
Copy link
Contributor

A 'free' but too old version, indeed.
still, things like plot,dist(10),xtickf='label_date' work.

@GillesDuvert
Copy link
Contributor

PR #1652 should solve your problem (and make label_date closer to what IDL provides)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed idl/gdl-only No C++ skills needed
Projects
None yet
Development

No branches or pull requests

3 participants