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

solvespace2x: init at 2.x #32651

Closed
wants to merge 3 commits into from
Closed

Conversation

nickbeljaev
Copy link

Motivation for this change

default.nix can't build live prog on two my Nix system
build from 2.x branch solvespace make live prog ver 2.3 on two my Nix system

Things done?
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10 labels Dec 13, 2017
@Mic92
Copy link
Member

Mic92 commented Dec 14, 2017

cc @edef1c

@edef1c
Copy link
Member

edef1c commented Dec 15, 2017

This… doesn't build (it doesn't even have a sha256 for the fetchgit), uses an older commit of the same master branch, uses GTK2 instead of GTK3, doesn't have a clear description, doesn't have a clean commit history. I'm not sure what to do with this at all, save for fixing my own derivation to stick cmake in nativeBuildInputs.

@nickbeljaev
Copy link
Author

Hi, edef1c. When I need in working solvespace I print nix-env -iA nixos.solvespace and got ver 2.0 with more bugs, then I pull nixpkgs tree and nix-build -A solvespace -> got prog which output "Illegal operation" and finished. Then I pull solvespace tree and find variant which got me solvespce ver2.3 without obvius bugs. At this time my needs sucessfull. But since sharing our duty, I copy and modification Your default.nix for this old but stable branch in separate 2.x.nix and push req. I'm not expert in Nixpkgs, and sorry if broken tradition, but may be other users like draw in solvespace too?

@Mic92
Copy link
Member

Mic92 commented Dec 15, 2017

@GrahamcOfBorg build solvespace2x

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure for system: aarch64-linux

error: hash '' has wrong length for hash type 'sha256'
(use '--show-trace' to show detailed location information)

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure for system: x86_64-darwin

error: Package ‘solvespace-2.x’ in /tmp/nix-ofborg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/applications/graphics/solvespace/2.x.nix:44 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure for system: x86_64-linux

builder for ‘/nix/store/8wz4nydrrg3cdfvwv5x2lagmh0gvlg5g-solvespace-b1d87bf.drv’ failed with exit code 1
fetching path ‘/nix/store/0mqn6p12ak8la9d9xdzklvfkn3fm9ald-hook’...

*** Downloading ‘https://nix-cache.s3.amazonaws.com/nar/04kgww42xz4djgn4ffpf7yh2fsdxx2ssy06hp9wx9fmca0q2f6az.nar.xz’ (signed by ‘cache.nixos.org-1’) to ‘/nix/store/0mqn6p12ak8la9d9xdzklvfkn3fm9ald-hook’...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1048  100  1048    0     0   1048      0  0:00:01 --:--:--  0:00:01 14356

cannot build derivation ‘/nix/store/7nvvzqmkg78kbml0gfmqdc1qigldwh0z-solvespace-2.x.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/7nvvzqmkg78kbml0gfmqdc1qigldwh0z-solvespace-2.x.drv’ failed

@orivej orivej changed the title add build from 2.x branch solvespace solvespace2x: add build from 2.x branch solvespace Dec 15, 2017
@orivej orivej changed the title solvespace2x: add build from 2.x branch solvespace solvespace2x: init at 2.x Dec 15, 2017
@nickbeljaev
Copy link
Author

Hi, after add sha256 from nix-prefetch-git output in 2.x.nix, I got cmake error (from intree libs)
"url": "https://github.com/solvespace/solvespace",
"rev": "b1d87bf284b32e875c8edba592113e691ea10bcd",
"date": "2017-04-16T02:14:16+00:00",
"sha256": "1n7rppzc7y23bv7qi3yp7y2f4bppp2fip9hvf0sqks7wbjwf4qws",
"fetchSubmodules": true

After comment sha256 from 2.x.nix script all work around. I'm lost in thought.

@nickbeljaev
Copy link
Author

Build results solvespace2x x86_64-linux (without sha256 hash in nix script!)

Version screenshot
selection_001

ldd out
ldd_solvespace2x.txt

@nickbeljaev
Copy link
Author

nickbeljaev commented Dec 15, 2017

I assume that with sha256 don't run fetchSubmodules, becouse cmake error watch this:

-- Using in-tree libdxfrw
CMake Error at CMakeLists.txt:99 (add_subdirectory):
The source directory
/tmp/nix-build-solvespace-2.x.drv-0/solvespace-b1d87bf/extlib/libdxfrw
does not contain a CMakeLists.txt file.

Without sha256 build sucess. Anybody understand why? If this sha256 wrong error must be early.

@orivej
Copy link
Contributor

orivej commented Dec 15, 2017

What is the output of nix-env --version and cat /run/current-system/nixos-version?

@nickbeljaev
Copy link
Author

nix-env --version
nix-env (Nix) 1.11.14
cat /run/current-system/nixos-version
17.03.1858.3d04a557b7

@orivej
Copy link
Contributor

orivej commented Dec 15, 2017

The users of NixOS 17.09 and older can not use OpenGL applications built from Nixpkgs master branch because of the glibc upgrade. Could you install solvespace with nix-env -f https://github.com/NixOS/nixpkgs/archive/release-17.09.tar.gz -iA solvespace and try using that? Note that we no longer maintain NixOS 17.03.

@nickbeljaev
Copy link
Author

Orivej, thanks for comment about version, I'm tray upgrade now.

Variant nix-env -f https://github.com/NixOS/nixpkgs/archive/release-17.09.tar.gz -iA solvespace
don't work - result eq nix-env -iA solvespace
(solvespace:17038): GLib-GIO-ERROR **: No GSettings schemas are installed on the system

@nickbeljaev
Copy link
Author

nickbeljaev commented Dec 16, 2017

Upgrade to 17.09

  1. nix-env -iA nixos.solvespace -> fatal bugs in solvespace runtime, program not usable
  2. nix-build -A solvespace2x (with sha256) -> cmake error - empty intree lib dir
  3. nix-build -A solvespace2x (without sha256) -> usable prog ver2.3
  4. nix-build -A solvespace -> Illegal instruction in runtime start

We can discard version about wrong sha256, because error cmake must be later hash check?

May be problem in wrong Nix tree? I'm pull NixOS/nixpgs, and use as src in 17.03 .. 17.09 system?
No, this discarded - build from tree nixpkgs-channels/nixos-17.09 eq build from master tree.

@the-kenny
Copy link
Contributor

We can't accept this package without a sha256. This would make the build non-reproducible and would break the package on any system with sandboxed builds. Instead of adding another package with a specific revision, I would rather try to fix the underlying issue of pkgs.solvespace.

@orivej
Copy link
Contributor

orivej commented Dec 16, 2017

@the-kenny The premise of this PR as I understand it is that the current solvespace does not even start, but it does run on master and it should run on release-17.09. (I'd like to find or reinvent how to build qemu VM with GUI with a custom configuration without touching my configuration.nix in order to test.)

@pbogdan
Copy link
Member

pbogdan commented Dec 16, 2017

@orivej You can override nixos-config on Nix path to point to a custom configuration, I've used

$ nixos-rebuild build-vm -I nixos-config=custom-configuration.nix

for testing purposes.

@nickbeljaev
Copy link
Author

nickbeljaev commented Dec 16, 2017

Anybody can explained how add true sha256 affected on build, if set random sha256 got other error

output path ‘/nix/store/mhvj4g35pvfwls6nlxfk62kv90iax8xj-solvespace-b1d87bf’ has r:sha256 hash ‘160qam04pfrwkh9qskfmjkj01wrjwhl09xi6jjxi009yqg3cff9l’ when ‘1n7rppzc7y73bv7qi3yp7y2f4bppp2fip9hvf0sqks7wbjwf4qws’ was expected

Probably I make uncorrect script in hash part.

nix-prefetch-git out1
"url": "https://github.com/solvespace/solvespace",
"rev": "b1d87bf284b32e875c8edba592113e691ea10bcd",
"date": "2017-04-16T02:14:16+00:00",
"sha256": "1n7rppzc7y23bv7qi3yp7y2f4bppp2fip9hvf0sqks7wbjwf4qws",
"fetchSubmodules": true

nix-prefetch-git out2
"url": "https://github.com/solvespace/solvespace.git",
"rev": "b1d87bf284b32e875c8edba592113e691ea10bcd",
"date": "2017-04-16T02:14:16+00:00",
"sha256": "160qam04pfrwkh9qskfmjkj01wrjwhl09xi6jjxi009yqg3cff9l",
"fetchSubmodules": true

I'm lost .git postfix... I'm sorry

Now work with sha256

As You advise
New pull req to release-17.09 or master?
What else needs to be corrected?

@nickbeljaev
Copy link
Author

@GrahamcOfBorg
Can I see more details from test grahamcofborg-eval?

@orivej
Copy link
Contributor

orivej commented Dec 16, 2017

@pbogdan Thank you, I have built a NixOS 17.09 VM with this config and confirmed that Solvespace works on NixOS 17.09.

@nickbeljaev solvespace2x builds and runs now. However, solvespace package runs just as well.

nix-env -iA nixos.solvespace -> fatal bugs in solvespace runtime, program not usable

Could you describe how to reproduce this?

nix-build -A solvespace -> Illegal instruction in runtime start

Could you post the console output if is written to the console, or a screenshot if it happens in the GUI?

@nickbeljaev
Copy link
Author

nickbeljaev commented Dec 16, 2017

@orivej
[nick@astra16:~]$ nix-env -iA nixos.solvespace
replacing old ‘solvespace-2.x’
installing ‘solvespace-2.3-20170808’

[nick@astra16:~]$ solvespace

** (solvespace:14120): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
SolveSpace!

(solvespace:14120): Gtk-WARNING **: Could not find the icon 'pan-end-symbolic'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
http://icon-theme.freedesktop.org/releases

(solvespace:14120): GLib-GIO-ERROR **: No GSettings schemas are installed on the system
Trace/breakpoint trap

------------my comment----------------------
""Fatal error when touch menu open or save, probably gtk3 widgets cause.""

[nick@astra16:~]$ cd pr/nix/nixpkgs

[nick@astra16:~/pr/nix/nixpkgs]$ nix-build -A solvespace
/nix/store/cb7zw35mcsm6pb5sn49kax4nylx1lsjb-solvespace-2.3-20170808

[nick@astra16:~/pr/nix/nixpkgs]$ nix-env -f . -iA solvespace
replacing old ‘solvespace-2.3-20170808’
installing ‘solvespace-2.3-20170808’

[nick@astra16:~/pr/nix/nixpkgs]$ solvespace
Illegal instruction

@orivej
If You have some time, pls tray this variant in your VM
solvespace_openbox.nix.txt

PS When I dug up this problem see threds approwed that solvespace on gtk3 is crude today and
branch solvespace/2.x on gtk2 was maked for practical used this program, which I needed.

https://github.com/solvespace/solvespace/tree/2.x
last string in Linux build section:
"A fully functional port to GTK3 is available, but not recommended for use due to bugs in this toolkit."

@nickbeljaev
Copy link
Author

@orivej I found some more time and install new 17.09 in vbox. Please see screenshot,or click open file in your solvespace VM. I don't understand why we lose so much time. I was hoping my digging might be useful to others, but I see that everyone is comfortable with a not working package. I would not want to lose my and your time further.
selection_002

@whitequark
Copy link

whitequark commented Dec 17, 2017

Maintainer of SolveSpace here. I strongly recommend building a recent commit from master if you have the capability, since it uses GTK3 and has numerous other important incremental improvements over 2.3. (In fact the current plan is to abandon the 2.x branch and cut the 2.4 release from master with a few more fixes.)

@nickbeljaev What's the backtrace for "Trace/breakpoint trap" issue you are observing?

@orivej
Copy link
Contributor

orivej commented Dec 17, 2017

@nickbeljaev Thank you, I was finally able to reproduce the issue.

To reproduce:

  • boot NixOS 17.09 (the issue does not occur on the master branch)
  • run solvespace
  • click File > Open

It exits as on the screenshot above.

@whitequark This must be a packaging issue, not a solvespace bug.

@orivej
Copy link
Contributor

orivej commented Dec 17, 2017

@jtojnar Could you guess what commit is missing from release to cause "No GSettings schemas are installed on the system"?

@jtojnar
Copy link
Member

jtojnar commented Dec 18, 2017

@orivej That happens when an application tries to load some setting and there are literally no GSettings schemas available. You could try adding some random dependency like gnome3.mutter to see a better error Settings schema 'foo' is not installed, but in this case, the schemas seem to be already present (passed by the wrapGAppsHook):

cat $(nix-build -A solvespace2x)/bin/solvespace | grep schemas
export XDG_DATA_DIRS='/nix/store/yjbhjcrcawhmm0lqqqr7807b8m6wfwp6-gtk+3-3.22.26/share/gsettings-schemas/gtk+3-3.22.26'${XDG_DATA_DIRS:+':'}$XDG_DATA_DIRS

The error should not be there.

@jtojnar
Copy link
Member

jtojnar commented Dec 18, 2017

Oh, yes, the file dialogue actually needs gsettings_desktop_schemas. We fixed it for unstable in #31891.

@orivej
Copy link
Contributor

orivej commented Dec 18, 2017

Thanks! I'll test if backporting it fixes solvespace.

@orivej
Copy link
Contributor

orivej commented Dec 18, 2017

@jtojnar, thank you for support!

@nickbeljaev, I have fixed the error in the release-17.09 branch in 3bee0c2. Could you check if solvespace package satisfies you now?

@nickbeljaev
Copy link
Author

@whitequark I see that problem with gtk3 component but I <year with NixOs and have some problem with understanding of its dependencies and its debug. Take the opportunity like say that SolveSpace have most clean and logical interface of all that I've seen in 3D CAD. Ver2.3 very stable, some time reliability more important than functionality.

@orivej Oh, I must say about menu as soon as possible, surprising that no one has previously tried to use SolveSpace for its intended purpose, apparently here only pure programmers :)
YES, now solvespace/default work on last stable branch.
It make tons (solvespace:1927): dconf-WARNING **: failed to commit changes to dconf: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files, and
@whitequark it seemed to me that the NURBS crossing works worse, but I temporarily lost 2.3 and could not be sure. But it building and run in NixOS 17.09

@orivej Thanks You for concernment. Sorry if I did something wrong.

@jtojnar
Copy link
Member

jtojnar commented Dec 18, 2017

@nickbeljaev Until we solve #11239, you will need to install dconf manually to solve “failed to commit changes to dconf”.

@nickbeljaev
Copy link
Author

@jtojnar solvespace3 2>/dev/null
But Thanks anyway for caring

@jtojnar
Copy link
Member

jtojnar commented Mar 29, 2018

If solvespace does not work, it should be fixed. Introducing an old version is not a good fix.

@jtojnar jtojnar closed this Mar 29, 2018
@Janik-Haag Janik-Haag added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10 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.

10 participants