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

Merge pull request #75946 from davidtwco/computecpp-init #75946

Merged
merged 1 commit into from Jan 17, 2020

Conversation

@davidtwco
Copy link
Member

davidtwco commented Dec 19, 2019

Motivation for this change

Adds package for ComputeCpp.

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 nix-review --run "nix-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.
Notify maintainers

cc me!

];
libaries = stdenv.lib.makeLibraryPath [
stdenv.cc.cc.lib
ncurses5

This comment has been minimized.

Copy link
@davidtwco

davidtwco Dec 19, 2019

Author Member

I'd appreciate advice from reviewers on how best to fix a issue with this package. When running the binary, I get the following output:

/nix/store/anf6w9ad9577d121w8v2jxhp9m09ycil-computecpp-1.2.0/bin/compute: /nix/store/7fnhs9lg64fgzx13d2skjrckiic2yqsk-ncurses-6.1-20190112-abi5-compat/lib/libtinfo.so.5: no version information available (required by /nix/store/anf6w9ad9577d121w8v2jxhp9m09ycil-computecpp-1.2.0/bin/compute)

I believe this is due to the original binary being compiled with an older version of libtinfo.so.5, but I'm not sure what I can do about that.

This comment has been minimized.

Copy link
@markuskowa

markuskowa Dec 20, 2019

Member

My guess is that libtinfo.so has been stripped of debug symbols. Does this prevent the program from starting?

This comment has been minimized.

Copy link
@davidtwco

davidtwco Dec 20, 2019

Author Member

It doesn't, it appears to work fine but just prints that message when invoked.

pkgs/development/compilers/computecpp/default.nix Outdated Show resolved Hide resolved
pkgs/development/compilers/computecpp/default.nix Outdated Show resolved Hide resolved
];
libaries = stdenv.lib.makeLibraryPath [
stdenv.cc.cc.lib
ncurses5

This comment has been minimized.

Copy link
@markuskowa

markuskowa Dec 20, 2019

Member

My guess is that libtinfo.so has been stripped of debug symbols. Does this prevent the program from starting?

@davidtwco davidtwco force-pushed the davidtwco:computecpp-init branch from d760722 to 2354b8d Dec 20, 2019
Copy link
Member

markuskowa left a comment

The derivation looks good to me now but I am no expert in compiler integration. Maybe @bhipple @Ericson2314 @Mic92 @FRidh want to have a look?

@Mic92

This comment has been minimized.

Copy link
Contributor

Mic92 commented Jan 17, 2020

Right now it does not find the gcc/stdlibc++ headers:

[nix-shell:~/.cache/nixpkgs-review/pr-75946]$ cat main.cpp
#include <iostream>

int main() {
  std::cout << "Hello world" << std::endl;
  return 0;
}

[nix-shell:~/.cache/nixpkgs-review/pr-75946]$ cat main.c
#include <stdio.h>

int main() {
  printf("Hello world\n");
  return 0;
}
[nix-shell:~/.cache/nixpkgs-review/pr-75946]$ compute++ main.cpp -o main
/nix/store/ymhg9r0xambgxpzj0gh6l6lcnk69ykdq-computecpp-1.2.0/bin/compute++: /nix/store/cbl3mpw1hr0b6038j5m9mp9hi38iyjjx-ncurses-6.1-20190112-abi5-compat/lib/libtinfo.so.5: no version information available (required by /nix/store/ymhg9r0xambgxpzj0gh6l6lcnk69ykdq-computecpp-1.2.0/bin/compute++)
/nix/store/ymhg9r0xambgxpzj0gh6l6lcnk69ykdq-computecpp-1.2.0/bin/compute++: /nix/store/cbl3mpw1hr0b6038j5m9mp9hi38iyjjx-ncurses-6.1-20190112-abi5-compat/lib/libtinfo.so.5: no version information available (required by /nix/store/ymhg9r0xambgxpzj0gh6l6lcnk69ykdq-computecpp-1.2.0/bin/compute++)
main.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~
1 error generated.

[nix-shell:~/.cache/nixpkgs-review/pr-75946]$ compute main.c -o main
/nix/store/ymhg9r0xambgxpzj0gh6l6lcnk69ykdq-computecpp-1.2.0/bin/compute: /nix/store/cbl3mpw1hr0b6038j5m9mp9hi38iyjjx-ncurses-6.1-20190112-abi5-compat/lib/libtinfo.so.5: no version information available (required by /nix/store/ymhg9r0xambgxpzj0gh6l6lcnk69ykdq-computecpp-1.2.0/bin/compute)
/nix/store/ymhg9r0xambgxpzj0gh6l6lcnk69ykdq-computecpp-1.2.0/bin/compute: /nix/store/cbl3mpw1hr0b6038j5m9mp9hi38iyjjx-ncurses-6.1-20190112-abi5-compat/lib/libtinfo.so.5: no version information available (required by /nix/store/ymhg9r0xambgxpzj0gh6l6lcnk69ykdq-computecpp-1.2.0/bin/compute)
In file included from main.c:1:
/nix/store/4v4ginzfvpsrnvafl1cxx1jn4wy6kc1r-glibc-2.27-dev/include/stdio.h:33:10: fatal error: 'stddef.h' file not found
#include <stddef.h>
         ^~~~~~~~~~
1 error generated.
@davidtwco

This comment has been minimized.

Copy link
Member Author

davidtwco commented Jan 17, 2020

Right now it does not find the gcc/stdlibc++ headers:

I'll look into fixing this, thanks.

Signed-off-by: David Wood <david.wood@codeplay.com>
@davidtwco davidtwco force-pushed the davidtwco:computecpp-init branch from 2354b8d to 853372b Jan 17, 2020
@davidtwco

This comment has been minimized.

Copy link
Member Author

davidtwco commented Jan 17, 2020

@Mic92 I've updated the commit to fix that issue.

@Mic92 Mic92 changed the title computecpp: init at 1.2.0 Merge pull request #75946 from davidtwco/computecpp-init Jan 17, 2020
@Mic92 Mic92 merged commit b4d4f83 into NixOS:master Jan 17, 2020
15 checks passed
15 checks passed
computecpp on aarch64-linux No attempt
Details
computecpp on x86_64-linux No attempt
Details
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@davidtwco davidtwco deleted the davidtwco:computecpp-init branch Jan 17, 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.