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

kicad-unstable: b7b64d959f -> 59575c19d8 #335314

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

uzytkownik
Copy link

Description of changes

Bump version of kicad-unstable so it can be build on nix unstable channel.
kicad and kicad-testing are still failing as the libgit2 patch is not on kicad 8.0 branch.

The test failed due to lack of X server.

Issues #335003 and #327181.

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.

@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Aug 17, 2024
@uzytkownik
Copy link
Author

@evils

Comment on lines 192 to 197
doCheck = (stable || testing);
doInstallCheck = !debug && (stable || testing);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand what's going on here. Is this related to your comment about "The test failed due to lack of X server."?

Is the comment on line 191 ("debug builds fail all but the python test") still accurate? It feels like it has bit-rotted in light of the changes here.

Copy link
Author

Choose a reason for hiding this comment

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

I don't understand what's going on here. Is this related to your comment about "The test failed due to lack of X server."?

Yes

Is the comment on line 191 ("debug builds fail all but the python test") still accurate? It feels like it has bit-rotted in light of the changes here.

No idea. The stable and testing build is broken due to libgit2 update so I cannot check it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll defer to @evils on this, but I believe we should make more of an effort to run the tests. Can we skip the problematic tests? If we cannot, we should leave a comment explaining why we're skipping the tests.

Copy link
Author

Choose a reason for hiding this comment

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

I don't disagree but I lack knowledge how to debug tests in nix sandbox.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, that's challenging. I find it can be helpful to get an interactive environment that's similar to the sandbox: https://wiki.nixos.org/wiki/Nixpkgs/Create_and_debug_packages#Using_nix-shell_for_package_development. That might help you?

Copy link
Author

Choose a reason for hiding this comment

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

@jfly The problem is missing fontconfig file:

INFO     cli_util:utils.py:36 Executing command "kicad-cli sch export pdf --pages 1 -o /build/source/qa/tests/output/cli/basic_test.pone.pdf /build/source/qa/data/cli/basic_test/basic_test.kicad_sch"
_ test_sch_export_pythonbom[cli/basic_test/basic_test.kicad_sch-basic_test.pythonbom-6-cli_args0] _

kitest = <conftest.KiTestFixture object at 0x7fff6e6248c0>
test_file = 'cli/basic_test/basic_test.kicad_sch'
output_fn = 'basic_test.pythonbom', line_skip_count = 6, cli_args = []

    @pytest.mark.parametrize("test_file,output_fn,line_skip_count,cli_args",
                                [("cli/basic_test/basic_test.kicad_sch", "basic_test.pythonbom", 6, [])
                                 ])
    def test_sch_export_pythonbom( kitest,
                             test_file: str,
                             output_fn: str,
                             line_skip_count: int,
                             cli_args: List[str] ):
        input_file = kitest.get_data_file_path( test_file )
        compare_filepath = kitest.get_data_file_path( "cli/basic_test/{}".format( output_fn ) )
    
        output_filepath =  kitest.get_output_path( "cli/" ).joinpath( output_fn )
    
        command = ["kicad-cli", "sch", "export", "python-bom"]
        command.extend( cli_args )
        command.append( "-o" )
        command.append( str( output_filepath ) )
        command.append( input_file )
    
        stdout, stderr, exitcode = utils.run_and_capture( command )
    
        assert exitcode == 0
>       assert stderr == ''
E       AssertionError: assert 'Fontconfig e...ile: (null)\n' == ''
E         
E         + Fontconfig error: Cannot load default config file: No such file: (null)

Test passes in this environment

Copy link
Author

Choose a reason for hiding this comment

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

How do I do debug build?

Copy link
Author

Choose a reason for hiding this comment

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

Also any idea how do I turn off those tests. It takes me over an hour for trimmed build (just -unstable) so I move slowly and can look at this just 1-2 times/week.

Copy link
Author

Choose a reason for hiding this comment

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

@jfly I disabled only the tests that fail and added note for debug build.

@@ -100,6 +101,7 @@ stdenv.mkDerivation rec {
# https://gitlab.com/kicad/code/kicad/-/issues/17133
"-DCMAKE_CTEST_ARGUMENTS='--exclude-regex;qa_spice'"
]
++ optional (!stable) "-DProtobuf_DIR=${protobuf}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the the expression here just !stable, but down below it's !stable && !testing?

Should we extract all this into a let needsProtobuf = ... at the top of this file?

Copy link
Author

Choose a reason for hiding this comment

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

It should be !stable && !testing. Should it be extracted to let needsProtobuf or let unstable?

Copy link
Contributor

Choose a reason for hiding this comment

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

let needsProtobuf feels more correct to me. Eventually it should evolve into let needsProtobuf = true, and then people will realize they can remove it enitrely. Whereas, let unstable feels more likely to stick around forever.

Copy link
Author

Choose a reason for hiding this comment

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

@jfly done

@uzytkownik uzytkownik force-pushed the kicad-unstable-testin branch from 48c6851 to 17546b6 Compare August 25, 2024 18:20
@uzytkownik uzytkownik force-pushed the kicad-unstable-testin branch from 17546b6 to 1c062b9 Compare August 31, 2024 23:10
@uzytkownik uzytkownik changed the title kicad-unstable: b7b64d959f -> 6641183d09 kicad-unstable: b7b64d959f -> c22eac2fbf Aug 31, 2024
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tests-are-failing-due-to-missing-fontconfig-config/51487/3

@uzytkownik uzytkownik force-pushed the kicad-unstable-testin branch from 1c062b9 to 13456cc Compare September 10, 2024 16:53
@uzytkownik uzytkownik requested a review from jfly September 10, 2024 16:54
@uzytkownik uzytkownik changed the title kicad-unstable: b7b64d959f -> c22eac2fbf kicad-unstable: b7b64d959f -> 59575c19d8 Sep 10, 2024
@FliegendeWurst FliegendeWurst added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Nov 14, 2024
@FliegendeWurst
Copy link
Member

Hmm.. I just tried this update on staging-next and it doesn't build there.
Unfortunately the latest upstream version:

diff --git a/pkgs/applications/science/electronics/kicad/base.nix b/pkgs/applications/science/electronics/kicad/base.nix
index cf21081d149c..09d7ae37247b 100644
--- a/pkgs/applications/science/electronics/kicad/base.nix
+++ b/pkgs/applications/science/electronics/kicad/base.nix
@@ -47,6 +47,8 @@
 , libngspice
 , valgrind
 , protobuf
+, nng
+, mbedtls
 
 , stable
 , testing
@@ -188,6 +190,8 @@ stdenv.mkDerivation rec {
     unixODBC
     libdeflate
     opencascade-occt
+    nng
+    mbedtls
   ]
   ++ optional needsProtobuf protobuf
   ++ optional (withScripting) wxPython
diff --git a/pkgs/applications/science/electronics/kicad/versions.nix b/pkgs/applications/science/electronics/kicad/versions.nix
index 983f8815000d..a4ed6a433700 100644
--- a/pkgs/applications/science/electronics/kicad/versions.nix
+++ b/pkgs/applications/science/electronics/kicad/versions.nix
@@ -47,23 +47,23 @@
   };
   "kicad-unstable" = {
     kicadVersion = {
-      version =			"2024-09-09";
+      version =			"2024-12-20";
       src = {
-        rev =			"59575c19d87b6bc01344844bcab4ac1718585b7c";
-        sha256 =		"sha256-ahKL56wJUxwH6rAbhmNwXNKGWA0mqcdpa9W7mBpjgjY=";
+        rev =			"3a7aa7b6601b7ba3325abc3e978576953e380ff4";
+        sha256 =		"04xz2gbdwr374zpzlmrswrf438lhqqba1w3b11fyrpsqsflr4is5";
       };
     };
     libVersion = {
-      version =			"2024-09-09";
+      version =			"2024-12-20";
       libSources = {
-        symbols.rev =		"f34ca0fe4d703626a2e548d587ebcb49dbf1cf6a";
-        symbols.sha256 =	"sha256-zv7aZWMeiy/NiqpsxnitPp1GR93DPpo7uFSt5xB5aIs=";
-        templates.rev =		"b65257c57a6222d67db23a6d2b205600e3bf4c9a";
-        templates.sha256 =	"sha256-6jNq2ZCeEDPwRGY1Av9crTu72rqYIom+EjDJPWbmLQ4=";
-        footprints.rev =	"70c89e2a017e52de1a86c23a6c6799da232d3033";
-        footprints.sha256 =	"sha256-3N6cyDyYQrBcbBfjIfnXSpD6xQTDBY/6nkdMN/Ty4Hg=";
-        packages3d.rev =	"eef24e75adc1d7a09e987b00fee9967b29aedd2e";
-        packages3d.sha256 =	"sha256-UVVggKKvHIkkiZdKTdvYW3tCC5nzSgtW5qB/MzZm0Q8=";
+        symbols.rev =		"41b48e1d82a6d25a19140c064c23f2dc18a23e66";
+        symbols.sha256 =	"0z5hxr2w3jddfskavvmzhb8sik6rbf2q4w489yrr3c4phnlbp513";
+        templates.rev =		"5b7c6099d9b6676c95ca336ce46c16da4da7e0bb";
+        templates.sha256 =	"1vpfh7ihi00c2cjla24a2dm4cwlrklivbig5zihrylj3185p01cr";
+        footprints.rev =	"03ed358c5a274aec3c90121bbc9e03fb571ce57e";
+        footprints.sha256 =	"1vmhxc1bm456dl74b5q7w5skg5g168k3zbgx2v51ifa2k3lcv30d";
+        packages3d.rev =	"90551c40514433d1c50ad60603ae0c9099bbd8e7";
+        packages3d.sha256 =	"035xf7lny8gis334p6vvyixib04klbla81glnl8hvz8h608bg1ws";
       };
     };
   };

results in an error about mbedtls:

/nix/store/ig90vk880c1pyqb3gijx889n6n8776ql-binutils-2.43.1/bin/ld: ../common/libkicommon.so.8.99.0: undefined reference to `mbedtls_ssl_handshake'
/nix/store/ig90vk880c1pyqb3gijx889n6n8776ql-binutils-2.43.1/bin/ld: ../common/libkicommon.so.8.99.0: undefined reference to `mbedtls_ssl_conf_dbg'
/nix/store/ig90vk880c1pyqb3gijx889n6n8776ql-binutils-2.43.1/bin/ld: ../common/libkicommon.so.8.99.0: undefined reference to `mbedtls_ssl_set_hostname'
/nix/store/ig90vk880c1pyqb3gijx889n6n8776ql-binutils-2.43.1/bin/ld: ../common/libkicommon.so.8.99.0: undefined reference to `mbedtls_ssl_free'
/nix/store/ig90vk880c1pyqb3gijx889n6n8776ql-binutils-2.43.1/bin/ld: ../common/libkicommon.so.8.99.0: undefined reference to `mbedtls_ssl_conf_psk'
/nix/store/ig90vk880c1pyqb3gijx889n6n8776ql-binutils-2.43.1/bin/ld: ../common/libkicommon.so.8.99.0: undefined reference to `mbedtls_ssl_close_notify'
/nix/store/ig90vk880c1pyqb3gijx889n6n8776ql-binutils-2.43.1/bin/ld: ../common/libkicommon.so.8.99.0: undefined reference to `mbedtls_x509_crl_init'
/nix/store/ig90vk880c1pyqb3gijx889n6n8776ql-binutils-2.43.1/bin/ld: ../common/libkicommon.so.8.99.0: undefined reference to `mbedtls_ssl_get_peer_cert'
/nix/store/ig90vk880c1pyqb3gijx889n6n8776ql-binutils-2.43.1/bin/ld: ../common/libkicommon.so.8.99.0: undefined reference to `mbedtls_ssl_config_init'
/nix/store/ig90vk880c1pyqb3gijx889n6n8776ql-binutils-2.43.1/bin/ld: ../common/libkicommon.so.8.99.0: undefined reference to `psa_crypto_init'

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.

^ see last comment (this review blocks merging)

@FliegendeWurst FliegendeWurst marked this pull request as draft January 11, 2025 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 12.approvals: 1 This PR was reviewed and approved by one reputable person 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