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

supercell-wx: init at 0.4.4 #316266

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

aware70
Copy link

@aware70 aware70 commented May 31, 2024

Description of changes

Adds Supercell Wx at version 0.4.4.

Supercell Wx is a free, open source application to visualize live and archive NEXRAD Level 2 and Level 3 data, and severe weather alerts. It displays continuously updating weather data on top of a responsive map, providing the capability to monitor weather events using reflectivity, velocity, and other products. Extended functionality, including weather reports and lightning data can be added using placefiles.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label May 31, 2024
@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label May 31, 2024
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels May 31, 2024
Copy link
Member

@FliegendeWurst FliegendeWurst left a comment

Choose a reason for hiding this comment

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

Build fails:

FAILED: wxdata/CMakeFiles/wxdata.dir/source/scwx/provider/aws_level3_data_provider.cpp.o
/nix/store/vh9fsdhgxcnab2qk7vdp2palkkn6j3cp-gcc-wrapper-13.3.0/bin/g++ -DFMT_SHARED -DONLY_C_LOCALE=0 -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -DUSE_OS_TZDB=1 -I/build/source/external/hsluv-c/src -I/build/source/wxdata/inclu
de -I/build/source/wxdata/source -I/build/source/external/units/include -isystem /nix/store/x6y7max0zx622sp0p12wi4xzmg82jw08-libxml2-2.13.4-dev/include/libxml2 -DBOOST_ALL_NO_LIB -O3 -DNDEBUG -std=c++20 -Wall -Wextra -Wpedantic -Werror -g -MD -MT
wxdata/CMakeFiles/wxdata.dir/source/scwx/provider/aws_level3_data_provider.cpp.o -MF wxdata/CMakeFiles/wxdata.dir/source/scwx/provider/aws_level3_data_provider.cpp.o.d -o wxdata/CMakeFiles/wxdata.dir/source/scwx/provider/aws_level3_data_provider.c
pp.o -c /build/source/wxdata/source/scwx/provider/aws_level3_data_provider.cpp
In file included from /nix/store/0vsyw5bhwmisszyfd1a0sdnwvnf4qa5a-gcc-13.3.0/include/c++/13.3.0/chrono:41,
                 from /build/source/wxdata/include/scwx/provider/nexrad_data_provider.hpp:5,
                 from /build/source/wxdata/include/scwx/provider/aws_nexrad_data_provider.hpp:3,
                 from /build/source/wxdata/include/scwx/provider/aws_level3_data_provider.hpp:3,
                 from /build/source/wxdata/source/scwx/provider/aws_level3_data_provider.cpp:3:
In constructor 'constexpr std::chrono::duration<_Rep, _Period>::duration(const _Rep2&) [with _Rep2 = long double; <template-parameter-2-2> = void; _Rep = long double; _Period = std::ratio<1>]',
    inlined from 'std::basic_istream<_CharT, _Traits>& date::from_stream(std::basic_istream<_CharT, _Traits>&, const CharT*, fields<Duration>&, std::__cxx11::basic_string<CharT, Traits, Alloc>*, std::chrono::minutes*) [with CharT = char; Traits =
std::char_traits<char>; Duration = std::chrono::duration<long int, std::ratio<1, 1000000000> >; Alloc = std::allocator<char>]' at /nix/store/4dm8l4hdhzm3bhiiixnp7wfa3wwps3c8-howard-hinnant-date-3.0.1-dev/include/date/date.h:7263:57,
    inlined from 'std::basic_istream<_CharT, _Traits>& date::from_stream(std::basic_istream<_CharT, _Traits>&, const CharT*, sys_time<Duration>&, std::__cxx11::basic_string<CharT, Traits, Alloc>*, std::chrono::minutes*) [with Duration = std::chron
o::duration<long int, std::ratio<1, 1000000000> >; CharT = char; Traits = std::char_traits<char>; Alloc = std::allocator<char>]' at /nix/store/4dm8l4hdhzm3bhiiixnp7wfa3wwps3c8-howard-hinnant-date-3.0.1-dev/include/date/date.h:8010:16,
    inlined from 'std::basic_istream<_CharT, _Traits>& date::operator>>(std::basic_istream<_CharT, _Traits>&, const parse_manip<Parsable, CharT, Traits, Alloc>&) [with Parsable = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono:
:duration<long int, std::ratio<1, 1000000000> > >; CharT = char; Traits = std::char_traits<char>; Alloc = std::allocator<char>]' at /nix/store/4dm8l4hdhzm3bhiiixnp7wfa3wwps3c8-howard-hinnant-date-3.0.1-dev/include/date/date.h:8080:23,
    inlined from 'static std::chrono::_V2::system_clock::time_point scwx::provider::AwsLevel3DataProvider::GetTimePointFromKey(const std::string&)' at /build/source/wxdata/source/scwx/provider/aws_level3_data_provider.cpp:121:35:
/nix/store/0vsyw5bhwmisszyfd1a0sdnwvnf4qa5a-gcc-13.3.0/include/c++/13.3.0/bits/chrono.h:574:17: error: 'S' may be used uninitialized [-Werror=maybe-uninitialized]
  574 |           : __r(static_cast<rep>(__rep)) { }
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /nix/store/4dm8l4hdhzm3bhiiixnp7wfa3wwps3c8-howard-hinnant-date-3.0.1-dev/include/date/tz.h:99,
                 from /build/source/wxdata/include/scwx/util/time.hpp:10,
                 from /build/source/wxdata/source/scwx/provider/aws_level3_data_provider.cpp:6:
/nix/store/4dm8l4hdhzm3bhiiixnp7wfa3wwps3c8-howard-hinnant-date-3.0.1-dev/include/date/date.h: In static member function 'static std::chrono::_V2::system_clock::time_point scwx::provider::AwsLevel3DataProvider::GetTimePointFromKey(const std::strin
g&)':
/nix/store/4dm8l4hdhzm3bhiiixnp7wfa3wwps3c8-howard-hinnant-date-3.0.1-dev/include/date/date.h:7261:37: note: 'S' declared here
 7261 |                         long double S;
      |                                     ^
cc1plus: all warnings being treated as errors

By the way, I think one commit supercell-wx: init at 0.4.4 is sufficient for the package.

@aware70 aware70 force-pushed the add-supercell-wx branch 3 times, most recently from d9f8788 to a3cf298 Compare October 26, 2024 20:54
pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
- commitString = commitString + "+dirty"
- copyrightYear = datetime.date.today().year
+ commitString = "@rev@"
+ copyrightYear = datetime.date.today().year
Copy link
Member

Choose a reason for hiding this comment

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

Not reproducible. I suppose it doesn't matter much though.

Copy link
Author

Choose a reason for hiding this comment

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

I could just hard-code it to the year of the revision being built.

Copy link
Author

Choose a reason for hiding this comment

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

I could also modify this script to read it from the LICENSE file. What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

If it's not too much effort, then yes.

Copy link
Author

Choose a reason for hiding this comment

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

@FliegendeWurst I have updated this patch to read the copyright year from the license file.

Comment on lines 111 to 118
+find_package(Boost REQUIRED COMPONENTS iostreams)
+find_package(BZip2)
find_package(cpr)
find_package(LibXml2)
find_package(re2)
find_package(spdlog)
+find_package(date)
+find_package(OpenSSL COMPONENTS Crypto)
Copy link
Member

Choose a reason for hiding this comment

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

So.. how does upstream build without these libraries? Just wondering

Copy link
Author

Choose a reason for hiding this comment

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

It doesn't - most of these are represented in the conanfile. BZip2 is acknowledged here but not explicitly tracked.

I bypassed the conanfile to bring in all the dependencies I could from Nix, and left alone some of the larger vendored dependencies (like maplibre-native-qt). Some of these might be here to fix linker errors for that.

The explicit link against OpenSSL::Crypto was to fix a linker error, but I could see that being a case of one of the Nix dependencies needing an withOpenSSL = true override somewhere.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Oct 29, 2024
@aware70 aware70 force-pushed the add-supercell-wx branch 2 times, most recently from aff8fd3 to 2a371da Compare November 1, 2024 17:09
@wegank wegank removed the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Nov 1, 2024
@FliegendeWurst FliegendeWurst added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Nov 2, 2024
@FliegendeWurst FliegendeWurst added the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 2, 2024
@wegank wegank removed the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Dec 2, 2024
@FliegendeWurst FliegendeWurst removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 4, 2024
@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Dec 4, 2024
curl,
glew,
geos,
boost185,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
boost185,
boost,

boost 1.85 was removed some time ago. New default version is 1.86 so it should work. Also replace below.

Copy link
Author

Choose a reason for hiding this comment

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

I've made the suggested change.

@wegank wegank removed the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Dec 26, 2024
@FliegendeWurst
Copy link
Member

Build fails on x64 Linux. Note that ofborg (and my build) are done by first merging the PR on current master. To reproduce the failure you need to rebase your branch on master.

FAILED: scwx-qt/CMakeFiles/scwx-qt.dir/source/scwx/qt/external/stb_image.cpp.o
/nix/store/xj72byimwa4w92f9vlrg921qdprr01vl-gcc-wrapper-14-20241116/bin/g++ -DBOOST_CONTAINER_DYN_LINK -DBOOST_CONTAINER_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_IOSTREAMS_NO_LIB -DBOOST_JSON_DYN_LINK -DBOOST_JSON_NO_LIB -DBOOST_TIMER_DYN_LINK ->
In file included from /build/source/scwx-qt/source/scwx/qt/external/stb_image.cpp:14:
/build/source/external/stb/stb_image.h: In function 'int stbi__parse_png_file(stbi__png*, int, int)':
/build/source/external/stb/stb_image.h:5166:56: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 5166 |                   for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger
      |                                                  ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/source/external/stb/stb_image.h:5082:25: note: at offset 3 into destination object 'tc' of size 3
 5082 |    stbi_uc has_trans=0, tc[3]={0};
      |                         ^~
cc1plus: all warnings being treated as errors

@aware70
Copy link
Author

aware70 commented Jan 2, 2025

Build fails on x64 Linux. Note that ofborg (and my build) are done by first merging the PR on current master. To reproduce the failure you need to rebase your branch on master.

FAILED: scwx-qt/CMakeFiles/scwx-qt.dir/source/scwx/qt/external/stb_image.cpp.o
/nix/store/xj72byimwa4w92f9vlrg921qdprr01vl-gcc-wrapper-14-20241116/bin/g++ -DBOOST_CONTAINER_DYN_LINK -DBOOST_CONTAINER_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_IOSTREAMS_NO_LIB -DBOOST_JSON_DYN_LINK -DBOOST_JSON_NO_LIB -DBOOST_TIMER_DYN_LINK ->
In file included from /build/source/scwx-qt/source/scwx/qt/external/stb_image.cpp:14:
/build/source/external/stb/stb_image.h: In function 'int stbi__parse_png_file(stbi__png*, int, int)':
/build/source/external/stb/stb_image.h:5166:56: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 5166 |                   for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger
      |                                                  ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/source/external/stb/stb_image.h:5082:25: note: at offset 3 into destination object 'tc' of size 3
 5082 |    stbi_uc has_trans=0, tc[3]={0};
      |                         ^~
cc1plus: all warnings being treated as errors

It looks like this was a new warning for gcc 14 from the updated stdenv. The same warning is present in the nixpkgs stb, which it turns out I wasn't actually using, so I fixed that too. I added a -Wno-error flag for it and fixed another gcc 14 include issue in the tests, which I will probably upstream.

However, it looks like a recent change to geographiclib (90b3a6a) which split the outputs has broken the project's integration with that library. Reverting the split outputs locally fixed it, but I will still investigate how to properly use the library in this new form.

@aware70
Copy link
Author

aware70 commented Jan 2, 2025

Hey @sikmir, the project added by this PR uses geographiclib and appears to have a cmake issue since 90b3a6a. I was able to work around it with

(geographiclib.overrideAttrs {
   outputs = [ "out" ];
})

Without that change, using

find_package(GeographicLib)

in the project's cmake configuration produces this error:

> CMake Error at /nix/store/1vj70709rlmnldkgcxaj8nl78qa0iw5h-geographiclib-2.5-dev/lib/cmake/GeographicLib/geographiclib-targets.cmake:126 (message):
>   The imported target "GeographicLib::GeographicLib_SHARED" references the
>   file
>
>      "/nix/store/1vj70709rlmnldkgcxaj8nl78qa0iw5h-geographiclib-2.5-dev/lib/libGeographicLib.so.26.1.1"
>
>   but this file does not exist.  Possible reasons include:
>
>   * The file was deleted, renamed, or moved to another location.
>
>   * An install or uninstall procedure did not complete successfully.
>
>   * The installation package was faulty and contained
>
>      "/nix/store/1vj70709rlmnldkgcxaj8nl78qa0iw5h-geographiclib-2.5-dev/lib/cmake/GeographicLib/geographiclib-targets.cmake"
>
>   but not all the files it references.
>
> Call Stack (most recent call first):
>   /nix/store/1vj70709rlmnldkgcxaj8nl78qa0iw5h-geographiclib-2.5-dev/lib/cmake/GeographicLib/geographiclib-config.cmake:55 (include)
>   scwx-qt/scwx-qt.cmake:16 (find_package)
>   scwx-qt/CMakeLists.txt:8 (include)
>
>
> -- Configuring incomplete, errors occurred!

I think this may be related to: #144170.

@sikmir
Copy link
Member

sikmir commented Jan 3, 2025

Hey @sikmir, the project added by this PR uses geographiclib and appears to have a cmake issue since 90b3a6a. I was able to work around it with

(geographiclib.overrideAttrs {
   outputs = [ "out" ];
})

Without that change, using

find_package(GeographicLib)

in the project's cmake configuration produces this error:

> CMake Error at /nix/store/1vj70709rlmnldkgcxaj8nl78qa0iw5h-geographiclib-2.5-dev/lib/cmake/GeographicLib/geographiclib-targets.cmake:126 (message):
>   The imported target "GeographicLib::GeographicLib_SHARED" references the
>   file
>
>      "/nix/store/1vj70709rlmnldkgcxaj8nl78qa0iw5h-geographiclib-2.5-dev/lib/libGeographicLib.so.26.1.1"
>
>   but this file does not exist.  Possible reasons include:
>
>   * The file was deleted, renamed, or moved to another location.
>
>   * An install or uninstall procedure did not complete successfully.
>
>   * The installation package was faulty and contained
>
>      "/nix/store/1vj70709rlmnldkgcxaj8nl78qa0iw5h-geographiclib-2.5-dev/lib/cmake/GeographicLib/geographiclib-targets.cmake"
>
>   but not all the files it references.
>
> Call Stack (most recent call first):
>   /nix/store/1vj70709rlmnldkgcxaj8nl78qa0iw5h-geographiclib-2.5-dev/lib/cmake/GeographicLib/geographiclib-config.cmake:55 (include)
>   scwx-qt/scwx-qt.cmake:16 (find_package)
>   scwx-qt/CMakeLists.txt:8 (include)
>
>
> -- Configuring incomplete, errors occurred!

I think this may be related to: #144170.

I will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants