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

ugtrain: init at 0.4.1 #53407

Closed
wants to merge 1 commit into from
Closed

ugtrain: init at 0.4.1 #53407

wants to merge 1 commit into from

Conversation

elitak
Copy link
Contributor

@elitak elitak commented Jan 4, 2019

Motivation for this change

Adding ugtrain. The --enable-glib option is on by default, but --enable-multilib is not, because I wasn't familiar with the idiom for including the linux-686 libs as buildInputs. Here is what's printed by configure when they're expected and absent:

checking for PTHREAD_PRIO_INHERIT... yes
checking whether the C++ compiler accepts -m32... yes
checking whether the C++ compiler accepts -m64... yes
checking whether gcc -m32 works... no
configure: error: You need to install 32-bit C development libraries.

Does anybody have any hints, like another package derivation to look at?

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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@sriemer
Copy link

sriemer commented Jan 4, 2019

The --enable-multilib option of ugtrain compiles the function hooking libs libmemhack and libmemdisc in their 32 bit variants additionally. This is basically only needed for proprietary games which still haven't understood that they should provide 64 bit binaries for Linux. I'd suggest to keep it disabled.
Otherwise, a package named e.g. glibc-devel-32bit is required additionally.

@elitak
Copy link
Contributor Author

elitak commented Jan 6, 2019

I think I figured out that I need to use stdenv_32bit conditionally. I'll leave --enable-multilib on by default, as it only increases the closure size from 46MB to 74MB, and doesn't break system="i686-linux" builds
I also added parallel building.

This is ready for review & commit now.

@elitak
Copy link
Contributor Author

elitak commented Feb 3, 2019

Can someone commit this, please?

@jtojnar
Copy link
Contributor

jtojnar commented Feb 3, 2019

Since Nix stores each library into its own prefix, we do not need multilib. 32 bit apps will use pkgsi686Linux and Nix will take care of this.

@elitak
Copy link
Contributor Author

elitak commented Feb 3, 2019

What? You understand that if I don't include stdenv_32bit and the multilib flag, the 32bit libraries for this package won't build on system = "x86_64-linux", right? These libs are meant to facilitate debugging of 32bit binaries on a 64bit system. You'll have to explain in more detail what you intend for me to change.

@jtojnar
Copy link
Contributor

jtojnar commented Feb 3, 2019

I think we do not need 32 bit libraries on system = "x86_64-linux", therefore there is not need for multilib. If we want to run 32 bit app, we can use the variant for system = "i686-linux" through pkgsi686Linux, see red for an example.

@elitak
Copy link
Contributor Author

elitak commented Feb 3, 2019

Okay, that makes sense now.

I'll change the default for multilib to false, in case users still want to have a single package that can handle both types of binaries.

@aanderse
Copy link
Member

aanderse commented Aug 4, 2019

ping (triage)

@stale
Copy link

stale bot commented Jun 1, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 3, 2020
@stale
Copy link

stale bot commented Jun 7, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 7, 2021
@FliegendeWurst
Copy link
Member

PR #100333 added the same application.

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

7 participants