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

octave: Try to use build with Qt5 #57950

Closed
wants to merge 2 commits into from

Conversation

matthiasbeyer
Copy link
Contributor

Motivation for this change

Tackling #57900

This is very much work in progress.

Right now I can build octaveFull with this patch applied, but it crashes at startup (signal 6). strace output:

[...]

recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\5\0\0\0\0\0\1\207U\211\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\207\0\2\0\1\0\0\0", iov_len=8}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 8
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\1\6\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="<\0\2\0\0\0\0\2+\2\1\0", iov_len=12}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 12
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\1\10\0\0\0\0\0\"\0\200\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
shutdown(3, SHUT_RDWR)                  = 0
close(3)                                = 0
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT PIPE ALRM TERM CHLD XCPU XFSZ VTALRM], NULL, 8) = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f6830c4d050) = 85090
rt_sigaction(SIGINT, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGABRT, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGALRM, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGBUS, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGFPE, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGHUP, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGILL, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGABRT, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, 8) = 0
rt_sigaction(SIGPIPE, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGIO, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGQUIT, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSEGV, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSYS, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTERM, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTRAP, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGUSR1, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGUSR2, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGVTALRM, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGIO, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, 8) = 0
rt_sigaction(SIGXCPU, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGXFSZ, {sa_handler=0x4035f0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f6830e55860}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [HUP INT QUIT PIPE ALRM TERM CHLD XCPU XFSZ VTALRM], NULL, 8) = 0
wait4(85090, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGABRT}], 0, NULL) = 85090
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=85090, si_uid=1000, si_status=SIGABRT, si_utime=3, si_stime=1} ---
write(2, "octave exited with signal ", 26octave exited with signal ) = 26
write(2, "6", 16)                        = 1
write(2, "\n", 1
)                       = 1
exit_group(0)                           = ?
+++ exited with 0 +++
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
      • centos 7
  • 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@lsix
Copy link
Member

lsix commented Mar 20, 2019

@matthiasbeyer I can build octave from your PR.

And, as for many qt5 applications, I need to intsall it properly before I can run it:

$ git checkout pr/57950
$ nix-build -A octaveFull
[…]
$ ./result/bin/octave
[1]    3887 abort      ./result/bin/octave
$ octave
command not found: ocatve
$ nix-env -i ./result
$ octave --gui
[octave gui launched here]

@matthiasbeyer
Copy link
Contributor Author

You are my hero! It starts for me, too! Awesome!

Now I guess I have to bring this PR here in shape for inclusion, right?

@matthiasbeyer
Copy link
Contributor Author

What I would do: I would add two packages where octave is build with Qt5.12 instead of Qt4 and add them to the top-level as octaveQt5 and octaveQt5Full. This way users do not automatically download Qt5 when upgrading their stuff but get the option to do the switch to the Qt5-version of octave.

Comments on this idea?

@matthiasbeyer
Copy link
Contributor Author

Okay, so what I have right now is:

  • It builds with libsForQt512 but without GUI because qcollectiongenerator cannot be found somehow
  • It builds (with gui) for libsForQt511
  • It builds (with gui) for libsForQt59

So I assume I should package it with 5.11 and do what I suggested above. I will do that tomorrow, though.

@matthiasbeyer
Copy link
Contributor Author

This builds for me, so lets see whether it builds for

@GrahamcOfBorg build octaveQt5Full

@7c6f434c
Copy link
Member

Hm, eval failure seems related to this PR

@matthiasbeyer
Copy link
Contributor Author

How can I reproduce this failure?

I just rebased this branch on master and rebuild the attribute and it worked fine in my environment (centos7 in a VM, no sandboxing).

@7c6f434c
Copy link
Member

@GrahamcOfBorg eval
@GrahamcOfBorg build octaveQt5
@matthiasbeyer did you also run the test-eval-release.sh script?

@aanderse
Copy link
Member

@matthiasbeyer Are you able to continue with this PR and address comments from @7c6f434c?

@doronbehar
Copy link
Contributor

This needs tests with the new octave 5.2.0.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
@doronbehar
Copy link
Contributor

@matthiasbeyer I'm working on enabling qt5 at these very moments. Since qt4 is deprecated both in Nixpkgs and upstream, I decided to drop the qt4 support and use qt5 or nothing by default. Plus, I'm trying to add a build with JIT enabled. Would you like to chat / join forces for this?

@matthiasbeyer
Copy link
Contributor Author

@doronbehar well, actually no, sorry. Building octave with qt5 was (at the time I started this PR) just a proof of concept for my professional job, that it could be done and "just work". I do not feel comfortable investing time into this direction in nixpkgs, as I am not actually using any qt applications myself (besides pavucontrol maybe) and am not knowledgeable about qt at all...

So I do not feel qualified for this, but I also do not have that much private time that I could invest in this topic to actually contribute somem real value to it.

@doronbehar
Copy link
Contributor

Don't mind it @matthewbauer. I've just finished my semester so I've just gained a lot of free time. I'll quote you when my PR will be ready so you could subscribe :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants