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

Fix conditionally declared vars #161

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Fix conditionally declared vars #161

wants to merge 1 commit into from

Conversation

tmi
Copy link
Contributor

@tmi tmi commented Feb 5, 2025

I was having issues compiling eckit because of

/src/eckit/src/eckit/geo/Download.cc: In static member function ‘static eckit::geo::Download::info_type eckit::geo::Download::to_path(const url_type&, const eckit::PathName&, bool)’:
/src/eckit/src/eckit/geo/Download.cc:91:33: error: ‘length’ was not declared in this scope; did you mean ‘Length’?
   91 |     return {static_cast<double>(length), timer.elapsed()};
      |                                 ^~~~~~
      |                                 Length
/src/eckit/src/eckit/geo/Download.cc:91:42: error: ‘timer’ was not declared in this scope; did you mean ‘Timer’?
   91 |     return {static_cast<double>(length), timer.elapsed()};
      |                                          ^~~~~
      |                                          Timer

so I'm just moving the variable declaration prior to the #if block. Not sure wether this makes sense in case there is no eckit curl, but at least it compiles for me now :)

@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.06%. Comparing base (509e64a) to head (911b10a).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #161   +/-   ##
========================================
  Coverage    64.06%   64.06%           
========================================
  Files         1079     1079           
  Lines        55679    55679           
  Branches      4118     4118           
========================================
  Hits         35669    35669           
  Misses       20010    20010           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Feb 5, 2025

Private downstream CI failed.
Workflow name: private-downstream-ci-hpc
View the logs at https://github.com/ecmwf-actions/private-downstream-ci/actions/runs/13159657901.

Copy link

github-actions bot commented Feb 5, 2025

Private downstream CI failed.
Workflow name: private-downstream-ci
View the logs at https://github.com/ecmwf-actions/private-downstream-ci/actions/runs/13159730440.

@pmaciel pmaciel closed this Feb 6, 2025
@pmaciel pmaciel reopened this Feb 6, 2025
@pmaciel
Copy link
Member

pmaciel commented Feb 6, 2025

So @tmi it looks like that curl was found, but the CURL_LIBRARIES variable was set incorreclty (to the directory containing the libs, not the libs themselves.) I didn't find an easy way to ask ecbuild any particular option, nor did I find an existing FindCURL.cmake module -- I really thought one has existed before (?)

The default behaviour of ecbuild is to also package search with modules (which I'm now bundling here) and generally pkgconfig is also present, which this module takes advantage of, and the development version of curl also prepares such a file, which helps.

I'm getting @wdeconinck and @danovaro so we can confirm this is the way forward -- myself I'm against adding more (and more) modules, I didn't see a way out this time. This version works on the hpc, mac + homebrew, docker images (custom dev build) -- I've tried. There are failing tests, but I suspect they've always failed (!) I'm not sure curl (or "EasyCurl") has had working tests, but that's a suspicion only.

Edit: the current situation, after compilation problems without CURL, is linking, errors like:
/opt/rh/gcc-toolset-13/root/usr/libexec/gcc/x86_64-redhat-linux/13/ld: ../../lib/libeckit.so: undefined reference to `curl_easy_perform'
(many of these, as there isn't a valid -lcurl in the linking without the module)

Copy link

github-actions bot commented Feb 6, 2025

Private downstream CI failed.
Workflow name: private-downstream-ci
View the logs at https://github.com/ecmwf-actions/private-downstream-ci/actions/runs/13189242692.

Copy link

github-actions bot commented Feb 6, 2025

Private downstream CI failed.
Workflow name: private-downstream-ci-hpc
View the logs at https://github.com/ecmwf-actions/private-downstream-ci/actions/runs/13189405552.

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.

3 participants