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

opencc: fix broken build (=> fixes goldendict) #79009

Closed
wants to merge 1 commit into from

Conversation

@samdoshi
Copy link
Contributor

@samdoshi samdoshi commented Feb 1, 2020

Motivation for this change

The LD_LIBRARY_PATH update from 3cd8ce3 causes opencc to stop building.

See also: #76804

In particular this stops goldendict from building.

I was unable to easily figure out how to fix the issue using makeFlags, so I've switched to using a preBuild phase.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

cc: @sifmelcara @andersk

@andersk
Copy link
Contributor

@andersk andersk commented Feb 1, 2020

Before #76804 we had

makeFlags = [ "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(CURDIR)/src" ]

which was expanded by Make (I just checked!) to

LD_LIBRARY_PATH=D_LIBRARY_PATH:/build/OpenCC-ver.1.0.5/build/src

because Make treated $L as an empty one-character variable. And the initial value of $LD_LIBRARY_PATH, even if it were to be used, is empty for this build. Perhaps the simplest solution is to just overwrite it completely:

makeFlags = [ "LD_LIBRARY_PATH=$(CURDIR)/src" ]
The LD_LIBRARY_PATH update from 3cd8ce3 causes opencc to stop building.

See also: #76804
@samdoshi samdoshi force-pushed the samdoshi:opencc-fix branch from 2bbc4b5 to c5ccad8 Feb 1, 2020
@andersk
andersk approved these changes Feb 1, 2020
@samdoshi
Copy link
Contributor Author

@samdoshi samdoshi commented Feb 1, 2020

Thanks @andersk, I've force pushed with your changes

@sifmelcara
Copy link
Contributor

@sifmelcara sifmelcara commented Feb 1, 2020

Thanks! simply override LD_LIBRARAY_PATH completely should be fine.

@samdoshi
Copy link
Contributor Author

@samdoshi samdoshi commented Feb 4, 2020

Looks like @bjornfor fixed this issue on master yesterday

f16019c

@samdoshi samdoshi closed this Feb 4, 2020
@samdoshi samdoshi deleted the samdoshi:opencc-fix branch Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.