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

MySQL 5.7 fails to build recently #35692

Closed
bbarker opened this issue Feb 27, 2018 · 6 comments
Closed

MySQL 5.7 fails to build recently #35692

bbarker opened this issue Feb 27, 2018 · 6 comments

Comments

@bbarker
Copy link
Contributor

bbarker commented Feb 27, 2018

Issue description

MySQL 5.7 fails to build recently:

mysql57_build_error.txt
default.nix

for me. This worked at one time, without issue.

Steps to reproduce

You can use the attached default.nix with nix-shell, or perhaps just try installing the mysql57 package. One thing that really confuses me, by the way, is that if you comment out mysql57 in default.nix, it still seems to try to build mysql. Seemingly it does this based on a reference in the shellHook, but this seems strange to me.

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

  • system: "x86_64-linux"
  • host os: Linux 4.13.0-32-generic, Ubuntu, 16.04.3 LTS (Xenial Xerus)
  • multi-user?: no
  • sandbox: no
  • version: nix-env (Nix) 1.11.16
  • channels(brandon): "nixpkgs-18.03pre129212.098c7f3d945, nixos-18.03pre129076.831ef4756e3"
  • nixpkgs: /nix/var/nix/profiles/per-user/brandon/channels/nixpkgs
@vcunat
Copy link
Member

vcunat commented Feb 27, 2018

To help you, MySQLs started to fail after gcc: 6 -> 7.

@vcunat
Copy link
Member

vcunat commented Feb 27, 2018

One thing that really confuses me [...]

Why would that be strange? You want to refer to a path that isn't (validly) in nix store yet.

@bbarker
Copy link
Contributor Author

bbarker commented Feb 27, 2018

@vcunat Thanks, that makes sense. I didn't know how much "magic" the interpreter does for stuff in shellHook.

So, how does one override the gcc version? was trying something like (mysql57.override { gcc = gcc6; }) but this is plainly incorrect on trying.

I also saw some truly ancient documentation here about overrideGCC.

@vcunat
Copy link
Member

vcunat commented Feb 27, 2018

I had tried building with gcc overridden to gcc6 – via the usual stdenv = overrideCC stdenv gcc6; as in many other places, but that wasn't enough for me.

@bbarker
Copy link
Contributor Author

bbarker commented Feb 27, 2018

@vcunat Indeed, if I try that I get the following output still:

-- Running cmake version 3.10.2                                                                                                                                                                                                                                                
-- Could NOT find Git (missing: GIT_EXECUTABLE)                                                                                                                                                                                                                                
-- Configuring with MAX_INDEXES = 64U                                                                                                                                                                                                                                          
-- The C compiler identification is GNU 7.3.0                                                                                                                                                                                                                                  
-- The CXX compiler identification is GNU 7.3.0                                                                                                                                                                                                                                
-- Check for working C compiler: /nix/store/gqg2vrcq7krqi9rrl6pphvsg81sb8pjw-gcc-wrapper-7.3.0/bin/gcc                                                                                                                                                                         
-- Check for working C compiler: /nix/store/gqg2vrcq7krqi9rrl6pphvsg81sb8pjw-gcc-wrapper-7.3.0/bin/gcc -- works                                                                                                                                                                
-- Detecting C compiler ABI info                                                                                                                                                                                                                                               
-- Detecting C compiler ABI info - done                                                                                                                                                                                                                                        
-- Detecting C compile features                                                                                                                                                                                                                                                
-- Detecting C compile features - done                                                                                                                                                                                                                                         
-- Check for working CXX compiler: /nix/store/gqg2vrcq7krqi9rrl6pphvsg81sb8pjw-gcc-wrapper-7.3.0/bin/g++                                                                                                                                                                       
-- Check for working CXX compiler: /nix/store/gqg2vrcq7krqi9rrl6pphvsg81sb8pjw-gcc-wrapper-7.3.0/bin/g++ -- works         

@nightkr
Copy link
Member

nightkr commented Mar 1, 2018

{pkgs, ...}: {
  services.mysql.enable = true;
  services.mysql.package = pkgs.mysql57.override {
    stdenv = pkgs.overrideCC pkgs.stdenv pkgs.gcc6;
  };
}

Seems to build correctly with GCC 6.4 for me (running nixos-unstable).

@globin globin closed this as completed in 6b05a22 Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants