Skip to content

Fix CI failure on MacOS and Windows#3303

Merged
JCGoran merged 2 commits into
masterfrom
jelic/fix_fmt_ci
Jan 8, 2025
Merged

Fix CI failure on MacOS and Windows#3303
JCGoran merged 2 commits into
masterfrom
jelic/fix_fmt_ci

Conversation

@JCGoran

@JCGoran JCGoran commented Jan 8, 2025

Copy link
Copy Markdown
Collaborator

The error in the CI is:

FAILED: external/nmodl/ext/spdlog/CMakeFiles/spdlog.dir/src/color_sinks.cpp.o 
ccache /usr/bin/g++  -DMPICH_SKIP_MPICXX=1 -DMPI_NO_CPPBIND=1 -DOMPI_SKIP_MPICXX=1 -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -I/usr/local/include -I/usr/X11R6/include -I/usr/local/opt/flex/include -I../external/nmodl/ext/spdlog/include -I../external/fmt/include -isystem ../external/iv/src/include -openmp-simd -g  -O2   -isysroot /Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk -mmacosx-version-min=13.7 -fPIC -fvisibility=hidden   -ferror-limit=1 -std=c++17 -MD -MT external/nmodl/ext/spdlog/CMakeFiles/spdlog.dir/src/color_sinks.cpp.o -MF external/nmodl/ext/spdlog/CMakeFiles/spdlog.dir/src/color_sinks.cpp.o.d -o external/nmodl/ext/spdlog/CMakeFiles/spdlog.dir/src/color_sinks.cpp.o -c ../external/nmodl/ext/spdlog/src/color_sinks.cpp
In file included from ../external/nmodl/ext/spdlog/src/color_sinks.cpp:10:
In file included from ../external/nmodl/ext/spdlog/include/spdlog/async.h:17:
In file included from ../external/nmodl/ext/spdlog/include/spdlog/async_logger.h:17:
In file included from ../external/nmodl/ext/spdlog/include/spdlog/logger.h:17:
../external/nmodl/ext/spdlog/include/spdlog/common.h:369:54: error: no template named 'basic_format_string' in namespace 'fmt'; did you mean 'basic_format_arg'?
inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) {
                                                ~~~~~^~~~~~~~~~~~~~~~~~~
                                                     basic_format_arg
/usr/local/include/fmt/base.h:2442:35: note: 'basic_format_arg' declared here
template <typename Context> class basic_format_arg {
                                  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 errors generated.

Key item is -I/usr/local/include, because a bit further up we see:

==> Fetching dependencies for ccache: blake3, fmt, hiredis and xxhash
==> Downloading https://ghcr.io/v2/homebrew/core/blake3/manifests/1.5.5
==> Fetching blake3
==> Downloading https://ghcr.io/v2/homebrew/core/blake3/blobs/sha256:f6f057edf60d9448debbe993061fe1ec0a19f706473a7f99a43cc122ec4ad95b
==> Downloading https://ghcr.io/v2/homebrew/core/fmt/manifests/11.1.1
==> Fetching fmt

The problem is, this new version of fmt broke spdlog (see gabime/spdlog#3312).
Since homebrew only ships versions 11.1.1 and wherever HEAD currently is (see the formula), the solution is to unlink the library.

Before unlinking:

$ file /usr/local/include/fmt
/usr/local/include/fmt: directory

after:

$ file /usr/local/include/fmt
/usr/local/include/fmt: cannot open `/usr/local/include/fmt' (No such file or directory)

UPDATE: Windows broke in the same way as #3252 so I applied fixes for that as well.

@JCGoran JCGoran changed the title Fix CI failure on MacOS Fix CI failure on MacOS and Windows Jan 8, 2025
@JCGoran JCGoran marked this pull request as ready for review January 8, 2025 11:55
@JCGoran JCGoran requested a review from nrnhines January 8, 2025 11:56
@sonarqubecloud

sonarqubecloud Bot commented Jan 8, 2025

Copy link
Copy Markdown

@nrnhines nrnhines left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad you were able to work around the issue!

Comment thread ci/win_install_deps.cmd
@azure-pipelines

Copy link
Copy Markdown

✔️ 36dcf73 -> Azure artifacts URL

@codecov

codecov Bot commented Jan 8, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.07%. Comparing base (fbeff9c) to head (36dcf73).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3303   +/-   ##
=======================================
  Coverage   67.07%   67.07%           
=======================================
  Files         571      571           
  Lines      111055   111055           
=======================================
  Hits        74488    74488           
  Misses      36567    36567           

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

@JCGoran JCGoran enabled auto-merge (squash) January 8, 2025 12:53
@JCGoran JCGoran merged commit d68acad into master Jan 8, 2025
@JCGoran JCGoran deleted the jelic/fix_fmt_ci branch January 8, 2025 12:59
JCGoran pushed a commit that referenced this pull request Jan 24, 2025
nrnhines added a commit that referenced this pull request Mar 24, 2025
At starting point, jelic/8.2-py313 #3319 had only two CI failures.

Almost the entirety of this PR is to get 8.2 to pass CI.
In addition it supports Python3.13.
Bug fixes adopted from the master are
#3239 Launching nrniv -python with Python 3.13.0 does not allow use of gui.
#3259 On h.quit() terminal settings are same as when neuron.hoc was imported.
#3243 save stdin terminal settings on import hoc and restore on h.quit()
#3276 Python 3.13.1 broke [s for s in sl] where sl is a SectionList. Manual partial cherry-pick.

Other PR attempts at fixing CI failures that can be closed when this PR is merged, are #3329 #3325 #3319 #3317

Many of the CI fixes are backports from #3028 #3040 #3303 #3105 #3278

bldnrnmacpkgcmake.sh was updated. It isolates a change (avoid breaking CI) with -DNRN_MAC_PKG=ON
---------

Co-authored-by: Goran Jelic-Cizmek <goran.jelic-cizmek@epfl.ch>
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.

2 participants