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

Build problem using github release file #313

Closed
0-wiz-0 opened this issue Apr 29, 2023 · 2 comments
Closed

Build problem using github release file #313

0-wiz-0 opened this issue Apr 29, 2023 · 2 comments

Comments

@0-wiz-0
Copy link

0-wiz-0 commented Apr 29, 2023

I've tried building git-cinnabar 0.6.1 using the github tarball from the release.
I see the following failure:

error: failed to run custom build command for `git-cinnabar v0.6.1 (/scratch/wip/git-cinnabar/work/git-cinnabar-0.6.1)`                                                                   
                                                                                                                                                                                          
Caused by:                                                                                                                                                                                
  process didn't exit successfully: `/scratch/wip/git-cinnabar/work/git-cinnabar-0.6.1/target/release/build/git-cinnabar-1195f9ca7f690327/build-script-build` (exit status: 101)          
  --- stdout                                                                                                                                                                              
  OPT_LEVEL = Some("3")                                                                                                                                                                   
  TARGET = Some("x86_64-unknown-netbsd")                                                                                                                                                  
  HOST = Some("x86_64-unknown-netbsd")                                                                                                                                                    
  cargo:rerun-if-env-changed=CC_x86_64-unknown-netbsd                                                                                                                                     
  CC_x86_64-unknown-netbsd = None                                                                                                                                                         
  cargo:rerun-if-env-changed=CC_x86_64_unknown_netbsd                                                                                                                                     
  CC_x86_64_unknown_netbsd = None                                                                                                                                                         
  cargo:rerun-if-env-changed=HOST_CC                                                                                                                                                      
  HOST_CC = None                                                                                                                                                                          
  cargo:rerun-if-env-changed=CC                                                                                                                                                           
  CC = Some("gcc")                                                                                                                                                                        
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-netbsd                                                                                                                                 
  CFLAGS_x86_64-unknown-netbsd = None                                                                                                                                                     
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_netbsd                                                                                                                                 
  CFLAGS_x86_64_unknown_netbsd = None                                                        
  cargo:rerun-if-env-changed=HOST_CFLAGS  
  HOST_CFLAGS = None                                                                                                                                                                      
  cargo:rerun-if-env-changed=CFLAGS       
  CFLAGS = Some("-O2 -g -fPIC -D_FORTIFY_SOURCE=2 -fstack-clash-protection -I/usr/pkg/include")
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS                                                                                                                                         
  CRATE_CC_NO_DEFAULTS = None                                                                                                                                                             
  DEBUG = Some("false")                                                                                                                                                                   
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")             
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-netbsd
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_netbsd
  cargo:rerun-if-env-changed=CFLAGS
  cargo:rerun-if-env-changed=TARGET_CFLAGS                                                   
  cargo:rerun-if-env-changed=DEP_CURL_INCLUDE
  cargo:rerun-if-env-changed=DEP_CURL_STATIC
  cargo:rerun-if-env-changed=DEP_Z_INCLUDE
  cargo:rerun-if-env-changed=CC_x86_64-unknown-netbsd
  cargo:rerun-if-env-changed=CC_x86_64_unknown_netbsd
  cargo:rerun-if-env-changed=CC
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  gmake[1]: Entering directory '/scratch/wip/git-cinnabar/work/git-cinnabar-0.6.1/target/release/build/git-cinnabar-57c10060bfb9abfb/out'
  echo "ifndef FAKE_INCLUDE" > config.mak.uname
  echo "#!/bin/sh" > detect-compiler
  git -C /scratch/wip/git-cinnabar/work/git-cinnabar-0.6.1 submodule sync
  echo "include /scratch/wip/git-cinnabar/work/git-cinnabar-0.6.1/git-core/config.mak.uname" >> config.mak.uname
  echo ". /scratch/wip/git-cinnabar/work/git-cinnabar-0.6.1/git-core/detect-compiler" >> detect-compiler
  chmod +x detect-compiler
  echo "endif" >> config.mak.uname
  echo "ifndef FAKE_INCLUDE" > config.mak.dev
  echo "include /scratch/wip/git-cinnabar/work/git-cinnabar-0.6.1/git-core/config.mak.dev" >> config.mak.dev
  echo "endif" >> config.mak.dev
  gmake[1]: Leaving directory '/scratch/wip/git-cinnabar/work/git-cinnabar-0.6.1/target/release/build/git-cinnabar-57c10060bfb9abfb/out'

  --- stderr
  fatal: not a git repository (or any parent up to mount point /)
  Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
  gmake[1]: *** [/scratch/wip/git-cinnabar/work/git-cinnabar-0.6.1/src/build.mk:17: /scratch/wip/git-cinnabar/work/git-cinnabar-0.6.1/git-core/Makefile] Error 128
  thread 'main' panicked at 'assertion failed: cmd.env(\"MAKEFLAGS\",\n                    format!(\"-j {}\",\n                        env(\"CARGO_MAKEFLAGS\"))).current_dir(&out_dir).st
atus().expect(\"Failed to execute GNU make\").success()', build.rs:229:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

This looks like it wants to extract some information using git from the tarball which fails because it's not a git repository,
but I'm not sure what the proper solution or workaround is.

@glandium
Copy link
Owner

glandium commented May 1, 2023

This is not a use case that I try to cater for. I wish github allowed to either make the source code archives include submodules or to skip them entirely, but unfortunately, neither option exists.

You can use e.g. cargo-download to get the source from crates.io, or clone the repo.

@0-wiz-0
Copy link
Author

0-wiz-0 commented May 2, 2023

Fair enough, thanks for the information.

@0-wiz-0 0-wiz-0 closed this as completed May 2, 2023
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

2 participants