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

puredata: upgrade to 0.54-0 and enable darwin #230569

Merged
merged 8 commits into from
Oct 14, 2023

Conversation

carlthome
Copy link
Member

@carlthome carlthome commented May 7, 2023

Description of changes

Upgrade Pure Data to latest and fix Darwin support.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.05 Release Notes (or backporting 22.11 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.

@ofborg ofborg bot added 6.topic: darwin Running or building packages on Darwin 8.has: package (new) This PR adds a new package labels May 7, 2023
@ofborg ofborg bot requested a review from cillianderoiste May 7, 2023 20:39
@onny
Copy link
Contributor

onny commented May 8, 2023

Looks great, thank you for this nice work. Could you please add this changelog url to the meta section? https://msp.puredata.info/Pd_documentation/x5.htm#s1

@carlthome
Copy link
Member Author

@onny thanks! Think this is ready to go now. Seems to work fine in sandboxed Darwin at least, in manual testing.

I could manually test on x86 Linux (NixOS desktop) if needed too.

@carlthome
Copy link
Member Author

Any action needed on my part to get this in?

@carlthome
Copy link
Member Author

carlthome commented May 14, 2023

For anyone on macOS wanting to run Pure Data, feel free to use

nix run github:carlthome/nixpkgs/puredata-darwin#puredata

in the meantime.

@carlthome carlthome force-pushed the puredata-darwin branch 4 times, most recently from ca42668 to 7cabc5d Compare May 14, 2023 21:06
@wegank
Copy link
Member

wegank commented May 25, 2023

Result of nixpkgs-review pr 230569 run on aarch64-linux 1

1 package marked as broken and skipped:
  • helmholtz
2 packages failed to build:
  • cyclone
  • gem
6 packages built:
  • maxlib
  • mrpeach
  • puredata
  • puremapping
  • timbreid
  • zexy

@wegank wegank marked this pull request as draft May 25, 2023 22:19
@wegank
Copy link
Member

wegank commented May 25, 2023

Breaks cyclone and gem, both need to be updated in the same PR.

@carlthome
Copy link
Member Author

Thanks @wegank! When I'm running nixpkgs-review pr 230569 I only see

1 package built:
puredata

on aarch64-darwin so I guess this is particularly about linux. I'll check it out on another machine.

@mitchmindtree mitchmindtree mentioned this pull request Jul 2, 2023
13 tasks
@carlthome
Copy link
Member Author

cyclone cannot compile because it's using private functions from puredata: pure-data/pure-data#2043

@carlthome
Copy link
Member Author

And gem is having

Event.cpp: In function 'void dequeueEvents()':
Event.cpp:353:5: error: 'error' was not declared in this scope; did you mean 'perror'?
  353 |     error("dequeue NULL queue");
      |     ^~~~~
      |     perror
Event.cpp:358:5: error: 'error' was not declared in this scope; did you mean 'perror'?
  358 |     error("dequeue empty queue");
      |     ^~~~~

@carlthome carlthome changed the title puredata: upgrade to 0.53-2 and enable darwin puredata: upgrade to 0.54-0 and enable darwin Aug 12, 2023
@ofborg ofborg bot requested a review from magnetophon August 12, 2023 13:24
@ofborg ofborg bot added the 11.by: package-maintainer This PR was created by the maintainer of the package it changes label Aug 12, 2023
@carlthome
Copy link
Member Author

Until porres/pd-cyclone#627 is resolved and a patch release exists, I think it's best to mark cyclone as broken since it doesn't compile. Regardless, it would be nice to get out an updated Pure Data version to have it work on Macs. Thoughts?

@carlthome carlthome marked this pull request as ready for review August 14, 2023 08:27
@magnetophon
Copy link
Member

Cyclone has been fixed in their master branch.
For me, everything works when I use:

{ lib, stdenv, fetchFromGitHub, puredata }:

stdenv.mkDerivation rec {
  pname = "cyclone";
  version = "unstable-2023-09-12";

  src = fetchFromGitHub {
    owner = "porres";
    repo = "pd-cyclone";
    rev = "7c470fb03db66057a2198843b635ac3f1abde84d";
    sha256 = "sha256-ixfnmeoRzV0qEOOIxCV1361t3d59fwxjHWhz9uXQ2ps=";
  };

  buildInputs = [ puredata ];

  makeFlags = [
    "pdincludepath=${puredata}/include/pd"
    "prefix=$(out)"
  ];

  postInstall = ''
    mv "$out/lib/pd-externals/cyclone" "$out/"
    rm -rf $out/lib
  '';

  meta = {
    description = "A library of PureData classes, bringing some level of compatibility between Max/MSP and Pd environments";
    homepage = "http://puredata.info/downloads/cyclone";
    license = lib.licenses.tcltk;
    maintainers = [ lib.maintainers.magnetophon ];
    platforms = lib.platforms.linux;
  };
}

@carlthome
Copy link
Member Author

Great news @magnetophon!

@carlthome
Copy link
Member Author

So should we merge this now?

Copy link
Member

@magnetophon magnetophon left a comment

Choose a reason for hiding this comment

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

Result of nixpkgs-review pr 230569 run on x86_64-linux 1

10 packages built:
  • cyclone
  • gem
  • helmholtz
  • magnetophonDSP.VoiceOfFaust
  • maxlib
  • mrpeach
  • puredata
  • puremapping
  • timbreid
  • zexy

Seemed fine, until I tried to test my most important pd patch, the one inside Voice Of Faust.

I got:

verbose(0): osc/packOSC
verbose(1): ... couldn't create
verbose(0): net/udpsend
verbose(1): ... couldn't create
fiddle version 1.1 TEST4
error: /nix/store/6gxvrxaql2kmf4vqmlnjwp0abr8w1nvr-VoiceOfFaust-1.1.4/PureData/helmholtz~.pd_linux:libstdc++.so.6: cannot open shared object file: No such file or directory
verbose(0): helmholtz~
verbose(1): ... couldn't create
verbose(0): net/udpreceive 5511
verbose(1): ... couldn't create
verbose(0): osc/unpackOSC
verbose(1): ... couldn't create
verbose(0): osc/pipelist
verbose(1): ... couldn't create
verbose(0): osc/routeOSC /VoiceOfFaust/OSC/max_pitch /VoiceOfFaust/OSC/min_pitch
verbose(1): ... couldn't create
Terminated

Not sure what causes that, I haven't had time to investigate.

@carlthome
Copy link
Member Author

Not sure what causes that, I haven't had time to investigate.

Hmm, on a skim it looks like there's a newer version of C++ assumed, since libstdc++.so.6: cannot open shared object file: No such file or directory

@carlthome
Copy link
Member Author

Should we merge this anyway or let it sit?

@magnetophon
Copy link
Member

Should we merge this anyway or let it sit?

Sorry for the late reply.
Turns out the issue was in my patch.

AFAIK this is good to merge.

@raboof
Copy link
Member

raboof commented Oct 13, 2023

I tried the following shell with this branch (nix-shell -I nixpkgs=/path/to/this/pr):

{ pkgs ? import <nixpkgs> {} }:

pkgs.mkShell {
  buildInputs = [
    (pkgs.puredata-with-plugins [ pkgs.gem ])
  ];
}

starting pd -lib Gem gives me Gem: can't load library. On nixos-unstable loading Gem does start, but ultimately fails (citing not being able to load libndi.so.4). I'm not sure that's the same problem, but it makes me reluctant to merge this PR

@carlthome
Copy link
Member Author

Thanks @raboof! I'll look into test running and fixing this when I get to a Linux workstation.

nix develop --impure --expr '{pkgs ? import <nixpkgs> {}, ...}: pkgs.mkShell { buildInputs = [ (pkgs.puredata-with-plugins [ pkgs.gem ]) ]; }'

Hoping it's just a matter of adding libndi to buildInputs.

@ofborg ofborg bot requested a review from magnetophon October 14, 2023 21:21
Co-authored-by: Weijia Wang <[email protected]>
@ofborg ofborg bot requested a review from magnetophon October 14, 2023 23:05
@wegank
Copy link
Member

wegank commented Oct 14, 2023

Result of nixpkgs-review pr 230569 run on aarch64-darwin 1

1 package built:
  • puredata

@wegank wegank merged commit 30e8b68 into NixOS:master Oct 14, 2023
21 of 22 checks passed
@raboof
Copy link
Member

raboof commented Oct 15, 2023

Thanks @raboof! I'll look into test running and fixing this when I get to a Linux workstation.

nix develop --impure --expr '{pkgs ? import <nixpkgs> {}, ...}: pkgs.mkShell { buildInputs = [ (pkgs.puredata-with-plugins [ pkgs.gem ]) ]; }'

Hoping it's just a matter of adding libndi to buildInputs.

Actually the NDI warning was just that, a warning. It seems something changed with the expected values passed to -path, but even with that fixed I'm now getting segmentation faults. Filed #261228 .

@carlthome carlthome deleted the puredata-darwin branch October 23, 2023 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants