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

dwarf-fortress: 0.44.10 -> 0.44.11 #42554

Merged
merged 4 commits into from Jul 4, 2018
Merged

dwarf-fortress: 0.44.10 -> 0.44.11 #42554

merged 4 commits into from Jul 4, 2018

Conversation

numinit
Copy link
Contributor

@numinit numinit commented Jun 25, 2018

Update everything, including dfhack and dwarf-therapist.

Motivation for this change

New Dwarf Fortress version: http://www.bay12games.com/dwarves/index.html#2018-06-23

Note that this is my first nixpkgs pull request, let me know if I did anything terribly wrong.

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
  • 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)
  • Fits CONTRIBUTING.md.

dwarf-fortress-original
dwarf-fortress-unfuck
dfhack
];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if this is right but it was complaining about not being to find dfVersion in all of the arguments

Copy link
Member

Choose a reason for hiding this comment

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

Yeah probably there is a dfVersion somewhere that needs to be updated.

@@ -12,7 +12,7 @@

stdenv.mkDerivation rec {
version = "2016-1_196";
dfVersion = "0.44.10";
dfVersion = "0.44.11";
Copy link
Member

Choose a reason for hiding this comment

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

You didn't update the hash.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, was wondering why I needed to do that. Thought it was just assurance that all the versions are the same (which they aren't between now and the time dfhack gets updated)

Copy link
Member

Choose a reason for hiding this comment

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

Oh nevermind it wouldn't effect the hash. I thought this was "version"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you know why themes aren't installing, and is it for a similar reason?

I get "attribute 'tergel' missing" when trying to set theme = "tergel".

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, that fixed it, will add it to this pull. Still getting a hang of Nix...

@numinit
Copy link
Contributor Author

numinit commented Jun 30, 2018

I see dfhack and therapist updated. Will add them to this pull.

@numinit
Copy link
Contributor Author

numinit commented Jun 30, 2018

Hmmm...

remote: Counting objects: 860, done.
remote: Compressing objects: 100% (787/787), done.
remote: Total 860 (delta 65), reused 359 (delta 39), pack-reused 0
Receiving objects: 100% (860/860), 2.45 MiB | 13.47 MiB/s, done.
Resolving deltas: 100% (65/65), done.
unpacking sources
unpacking source archive /nix/store/gbihjsjgjb3nx6gj0a5rx3rdy5smcrl4-source
From https://github.com/DFHack/dfhack
 * tag               0.44.11-alpha1 -> FETCH_HEAD
source root is source
patching sources
configuring
fixing cmake files...
Switched to a new branch 'fetchgit'
cmake flags: -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/k8k0bnf75pgwrzpap76bss3cybz95p5v-dwarf-therapist-original-40.1.0/include -DCMAKE_INSTALL_LIBDIR=/nix/store/k8k0bnf75pgwrzpap76bss3cybz95p5v-dwarf-therapist-original-40.1.0/lib -DCMAKE_INSTALL_NAME_DIR=/nix/store/k8k0bnf75pgwrzpap76bss3cybz95p5v-dwarf-therapist-original-40.1.0/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_DEPLOYMENT_TARGET= -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_FRAMEWORK=last -DCMAKE_STRIP=/nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip -DCMAKE_RANLIB=/nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/ranlib -DCMAKE_AR=/nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/nix/store/k8k0bnf75pgwrzpap76bss3cybz95p5v-dwarf-therapist-original-40.1.0
Submodule 'depends/clsocket' (https://github.com/DFHack/clsocket.git) registered for path 'depends/clsocket'
Submodule 'library/xml' (https://github.com/DFHack/df-structures.git) registered for path 'library/xml'
Submodule 'plugins/isoworld' (https://github.com/DFHack/isoworld.git) registered for path 'plugins/isoworld'
Submodule 'plugins/stonesense' (https://github.com/DFHack/stonesense.git) registered for path 'plugins/stonesense'
Submodule 'scripts2' (https://github.com/DFHack/scripts.git) registered for path 'scripts'
error: key does not contain a section: .url

#39956 maybe? None of the submodules have spaces though...

Update everything but dfhack and dwarf-therapist, which
have not been updated yet.
@numinit
Copy link
Contributor Author

numinit commented Jun 30, 2018

Updated my local nixpkgs checkout; issue seems to be resolved.

@numinit
Copy link
Contributor Author

numinit commented Jun 30, 2018

Still an issue with stonesense, looks like it might be missing a dependency:

 GLhandleARB tinter;
 ^~~~~~~~~~~
 sighandler_t
/tmp/nix-build-dfhack-0.44.11-alpha1.drv-0/source/plugins/stonesense/GUI.cpp:78:1: error: 'GLhandleARB' does not name a type; did you mean 'sighandler_t'?
 GLhandleARB tinter_shader;
 ^~~~~~~~~~~
 sighandler_t
make[2]: *** [plugins/stonesense/CMakeFiles/stonesense.dir/build.make:271: plugins/stonesense/CMakeFiles/stonesense.dir/GUI.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4501: plugins/stonesense/CMakeFiles/stonesense.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
builder for '/nix/store/mi2bwx708rvm3l6m43cj0fz2i6s48amr-dfhack-0.44.11-alpha1.drv' failed with exit code 2

@numinit
Copy link
Contributor Author

numinit commented Jul 1, 2018

Having several problems if I want to use dfhack:

First, it's missing a symbol which is apparently found in unfuck or libgraphics.so.

If you do any changes in it, don't forget to clean it when updating the game version!
We try to detect changes based on data directories being symbolic links -- keep this in mind.

/nix/store/f91i0ahbshkqpd619y7jpw866iafyghc-dwarf-fortress-env-0.44.11/libs/Dwarf_Fortress: symbol lookup error: /nix/store/f91i0ahbshkqpd619y7jpw866iafyghc-dwarf-fortress-env-0.44.11/hack/libdfhack.so: undefined symbol: _ZN8rendererD1Ev

If I add the following to wrapper/dwarf-fortress-init.in:

unfuck_dir="@unfuck@"
if [ ! -z "$unfuck_dir" ]; then
  export LD_LIBRARY_PATH="$unfuck_dir:$LD_LIBRARY_PATH"
  export LD_PRELOAD="$unfuck_dir/libgraphics.so:$LD_PRELOAD"
fi

And the following to wrapper/default.nix:

    unfuck = if stdenv.isLinux then "${dfunfuck}/lib" else ""

Then this happens:

mkdir: /nix/store/2kcrj1ksd2a14bm5sky182fv2xwfhfap-glibc-2.26-131/lib/libc.so.6: version `GLIBC_2.27' not found (required by /nix/store/ilbirzqw57lfhk6x8m53c6fa5ygll4kn-dwarf_fortress_unfuck-0.44.11/lib/libgraphics.so)
mkdir: /nix/store/2kcrj1ksd2a14bm5sky182fv2xwfhfap-glibc-2.26-131/lib/libc.so.6: version `GLIBC_2.27' not found (required by /nix/store/kxlczbgs4prbil5gsvicbrjs6f951fk9-libpulseaudio-11.1/lib/pulseaudio/libpulsecommon-11.1.so)
mkdir: /nix/store/2kcrj1ksd2a14bm5sky182fv2xwfhfap-glibc-2.26-131/lib/libc.so.6: version `GLIBC_2.27' not found (required by /nix/store/zajwxkz8al80j8vrmfv8kacbsbs09rxw-systemd-238-lib/lib/libsystemd.so.0)

@numinit
Copy link
Contributor Author

numinit commented Jul 1, 2018

Gone hunting for a root cause, this looks like it:

svenstaro/dwarf_fortress_unfuck@c25627a#diff-af3b638bc2a3e6c650974192a53c7291R4

libgraphics in unfuck is now built in release mode, which is removing some symbols dfhack needs.

[Edit] reported upstream: svenstaro/dwarf_fortress_unfuck#22

@numinit
Copy link
Contributor Author

numinit commented Jul 1, 2018

This should be mostly working now, people can checkout numinit/nixpkgs:df if they want a working 0.44.11+therapist+dfhack+unfuck.

Still some weird things going on with therapist not finding memory layout files. Had to manually symlink the therapist share directory into my home folder. Will look into that more.

Would also like a nicer fix for dfhack breaking on Linux, but patching CMakeLists.txt seems to work for now.

So, with all that considered, would like to make some more changes before squashing and requesting a review, but this is a starting point for any of itching to try 0.44.11 on NixOS.

@matthewbauer
Copy link
Member

Ok pushed a commit to fix a few issues. Hope everything still works okay.

@matthewbauer matthewbauer merged commit 75e2aca into NixOS:master Jul 4, 2018
@numinit
Copy link
Contributor Author

numinit commented Jul 4, 2018

Looks like unfuck got an update upstream. I've been running the fixed version locally; will submit another pull later.

Thanks for the feedback on my first NixOS pull :-)

@Baughn
Copy link
Contributor

Baughn commented Jul 5, 2018

This updates to an unstable alpha version of dfhack, which warns that it's likely to corrupt game data structures. I know it's called nixos-unstable, but still...

@matthewbauer
Copy link
Member

Hmmm... should we have stayed at the old dfhack? The issue is that dfhack is kind of worthless if it doesn't work on the dwarf fortress available.

@matthewbauer
Copy link
Member

We actually could provide older versions of dwarf fortress fairly easily with some .json. Maybe that would lessen the burden in updating dwarf fortress to make everything work at once?

@Baughn
Copy link
Contributor

Baughn commented Jul 5, 2018

Considering #43081, I'd very much like us to provide a works-by-default "lazy" package. If that means holding back DF, as it likely does, then... yes, I think we're going to need that.

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

5 participants