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

shards 0.10.0 build issue at Arch Linux #347

Closed
anatol opened this issue Apr 8, 2020 · 3 comments
Closed

shards 0.10.0 build issue at Arch Linux #347

anatol opened this issue Apr 8, 2020 · 3 comments

Comments

@anatol
Copy link
Contributor

anatol commented Apr 8, 2020

This is a followup for this discussion #322 (comment)

I am trying to push the official Arch Linux package. Currently my build script looks like

# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>
# Contributor: Jonne Haß <me@jhass.eu>

pkgname=shards
pkgver=0.10.0
_molinillo_ver=0.1.0
pkgrel=1
pkgdesc='The package manager for the Crystal language'
arch=(x86_64)
url='https://github.com/crystal-lang/shards'
license=(Apache)
depends=(libyaml git pcre libevent gc)
makedepends=(crystal)
source=(shards-$pkgver.tar.gz::https://github.com/crystal-lang/shards/archive/v$pkgver.tar.gz
        molinillo-$_molinillo_ver.tar.gz::https://github.com/crystal-lang/crystal-molinillo/archive/v$_molinillo_ver.tar.gz)
sha256sums=('3aea420df959552d1866d473c878ab1ed0b58489c4c9881ef40a170cfb775459'
            '1ecc7a8bf52a3bfdc0134d4c58f1155ef204a22a3fed151ac2d4ba6a9e9e0a15')

prepare() {
  mkdir -p shards-$pkgver/lib
  ln -s $srcdir/crystal-molinillo-$_molinillo_ver/src shards-$pkgver/lib/molinillo
}

build() {
  cd shards-$pkgver
  make CRFLAGS=--release
}

check() {
  cd shards-$pkgver
  make test
}

package() {
  cd shards-$pkgver
  make install
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

make CRFLAGS=--release completes successfully. But when it comes to make test it fails:

crystal spec ./spec/unit/*_spec.cr
crystal spec ./spec/integration/*_spec.cr
Error renaming file: '/build/.cache/crystal/build-shards-src-shards-0.10.0-spec/T-ime5858L-ocation5858Z-one.o.tmp' -> '/build/.cache/crystal/build-shards-src-shards-0.10.0-spec/T-ime5858L-ocation5858Z-one.o': No such file or directory (File::NotFoundError)
  from ???
  from ???
  from ???
  from ???
  from ???
Error renaming file: '/build/.cache/crystal/build-shards-src-shards-0.10.0-spec/H-ash40S-tring4432S-tring41.o.tmp' -> '/build/.cache/crystal/build-shards-src-shards-0.10.0-spec/H-ash40S-tring4432S-tring41.o': No such file or directory (File::NotFoundError)
  from ???
  from ???
  from ???
  from ???
  from ???
Error renaming file: '/build/.cache/crystal/build-shards-src-shards-0.10.0-spec/F-loat5858P-rinter.o.tmp' -> '/build/.cache/crystal/build-shards-src-shards-0.10.0-spec/F-loat5858P-rinter.o': No such file or directory (File::NotFoundError)
  from ???
  from ???
  from ???
  from ???
  from ???
Error renaming file: '/build/.cache/crystal/build-shards-src-shards-0.10.0-spec/U-nicode.o.tmp' -> '/build/.cache/crystal/build-shards-src-shards-0.10.0-spec/U-nicode.o': No such file or directory (File::NotFoundError)
  from ???
  from ???
  from ???
  from ???
  from ???
Error renaming file: '/build/.cache/crystal/build-shards-src-shards-0.10.0-spec/_main.o.tmp' -> '/build/.cache/crystal/build-shards-src-shards-0.10.0-spec/_main.o': No such file or directory (File::NotFoundError)
  from ???
  from ???
  from ???
  from ???
  from ???
cc: error: S-tring.o: No such file or directory
cc: error: S-tring5858B-uilder.o: No such file or directory
cc: error: G-C-.o: No such file or directory
cc: error: C-har5858R-eader.o: No such file or directory
cc: error: U-I-nt32.o: No such file or directory
cc: error: I-nt32.o: No such file or directory
cc: error: C-har.o: No such file or directory
cc: error: S-lice40T-41.o: No such file or directory
cc: error: I-O-5858E-ncoder.o: No such file or directory
cc: error: C-rystal5858I-conv.o: No such file or directory
cc: error: E-numerable5858R-eflect40I-nt3241.o: No such file or directory
cc: error: R-untimeE-rror.o: No such file or directory
cc: error: S-taticA-rray40U-I-nt84432102441.o: No such file or directory
cc: error: I-ndexE-rror.o: No such file or directory
cc: error: M-ath.o: No such file or directory
cc: error: S-taticA-rray40U-I-nt84432441.o: No such file or directory
cc: error: S-taticA-rray40U-I-nt8443212941.o: No such file or directory
cc: error: I-nt64.o: No such file or directory
cc: error: D-ivisionB-yZ-eroE-rror.o: No such file or directory
cc: error: I-nvalidB-yteS-equenceE-rror.o: No such file or directory
cc: error: F-ile5858N-otF-oundE-rror.o: No such file or directory
cc: error: F-ile5858A-lreadyE-xistsE-rror.o: No such file or directory
cc: error: F-ile5858A-ccessD-eniedE-rror.o: No such file or directory
cc: error: F-ile5858E-rror43.o: No such file or directory
cc: error: A-rray40S-tring41.o: No such file or directory
cc: error: P-ointer40S-tring41.o: No such file or directory
cc: error: I-terator5858S-top.o: No such file or directory
cc: error: P-ointer40V-oid41.o: No such file or directory
cc: error: P-roc40I-nt324432N-il41.o: No such file or directory
cc: error: S-taticA-rray40I-nt8443225641.o: No such file or directory
cc: error: P-ointer40I-nt841.o: No such file or directory
cc: error: F-iber5858S-tackP-ool.o: No such file or directory
cc: error: D-eque40P-ointer40V-oid4141.o: No such file or directory
cc: error: T-hread5858M-utex.o: No such file or directory
cc: error: F-ile5858P-ermissions.o: No such file or directory
cc: error: A-rray40T-uple40U-I-nt644432I-nt164432I-nt164141.o: No such file or directory
cc: error: P-ointer40T-uple40U-I-nt644432I-nt164432I-nt164141.o: No such file or directory
cc: error: A-rray40F-loat585-7322d6c8fe1296c88edebdcd115c89ad.o: No such file or directory
cc: error: P-ointer40F-loat5-36d63b0ae213f3427e187530ef6f5ab5.o: No such file or directory
cc: error: F-loat5858P-rinter5858C-achedP-owers5858P-ower.o: No such file or directory
cc: error: F-iber.o: No such file or directory
cc: error: T-hread5858L-inkedL-ist40F-iber41.o: No such file or directory
cc: error: C-rystal5858S-ystem5858R-andom.o: No such file or directory
cc: error: C-rystal5858S-cheduler.o: No such file or directory
cc: error: L-og5858C-ontext.o: No such file or directory
cc: error: H-ash40S-tring4432L-og5858C-ontext41.o: No such file or directory
cc: error: L-og5858B-uilder.o: No such file or directory
cc: error: H-ash40S-tring4432W-eakR-ef40L-og4141.o: No such file or directory
cc: error: P-ointer40H-ash58-362f7eee022f72865c226a8536023007.o: No such file or directory
cc: error: A-rray40L-og5858B-uilder5858B-inding41.o: No such file or directory
cc: error: P-ointer40L-og5858B-uilder5858B-inding41.o: No such file or directory
cc: error: L-og5858I-O-B-ackend.o: No such file or directory
cc: error: H-ash40L-og5858S-everity4432S-ymbol41.o: No such file or directory
cc: error: P-ointer40H-ash58-df8917cb08c02485e0140114fcfc9aa1.o: No such file or directory
cc: error: L-og5858S-everity.o: No such file or directory
cc: error: H-ash5858E-ntry40L-og5858S-everity4432S-ymbol41.o: No such file or directory
Error: execution of command failed with code: 1: `cc "${@}" -o '/build/.cache/crystal/crystal-run-spec.tmp'  -rdynamic  -lyaml -lpcre -lm -lgc -lpthread /usr/lib/crystal/ext/libcrystal.a -levent -lrt -ldl -L/usr/lib -L/usr/local/lib`
make: *** [Makefile:39: test_unit] Error 1
make: *** Waiting for unfinished jobs....
cc: error: 47build47shards47-7c93cf997daaf85818fde0ea6d6e2fd0.o: No such file or directory
cc: error: D-ir5858G-lobber.o: No such file or directory
cc: error: A-rray40A-rray40D-cb50b0f80f8f0560de46323236b1192f.o: No such file or directory
cc: error: P-ointer40A-rray4-c063451c30ee0e2c359a34203e1aa570.o: No such file or directory
cc: error: A-rray40D-ir5858G-fbfbd3b0465abe6937d4ce9852f079cb.o: No such file or directory
cc: error: P-ointer40D-ir585-29993c5b9ad800ff233d1e9636f06fa1.o: No such file or directory
cc: error: D-ir5858G-lobber5858D-irectoriesO-nly.o: No such file or directory
cc: error: D-ir5858G-lobber5858C-onstantE-ntry.o: No such file or directory
cc: error: D-ir5858G-lobber5858E-ntryM-atch.o: No such file or directory
cc: error: D-ir5858G-lobber5858R-ecursiveD-irectories.o: No such file or directory
cc: error: D-ir5858G-lobber5858C-onstantD-irectory.o: No such file or directory
cc: error: D-ir5858G-lobber5858D-irectoryM-atch.o: No such file or directory
cc: error: D-ir5858G-lobber5858R-ootD-irectory.o: No such file or directory
cc: error: A-rray40T-uple40I-19324b9b5199fbad285e3990f26d7c40.o: No such file or directory
cc: error: P-ointer40T-uple4-54fc035efa975afa4fb13fe89efb44b1.o: No such file or directory
cc: error: A-rray40D-ir41.o: No such file or directory
cc: error: P-ointer40D-ir41.o: No such file or directory
cc: error: H-ash40S-ymbol4432S-tring41.o: No such file or directory
cc: error: P-ointer40H-ash5858E-ntry40S-ymbol4432S-tring4141.o: No such file or directory
cc: error: H-ash5858E-ntry40S-ymbol4432S-tring41.o: No such file or directory
Error: execution of command failed with code: 1: `cc "${@}" -o '/build/.cache/crystal/crystal-run-spec.tmp'  -rdynamic  -lyaml -lpcre -lm -lgc -lpthread /usr/lib/crystal/ext/libcrystal.a -levent -lrt -ldl -L/usr/lib -L/usr/local/lib`
make: *** [Makefile:42: test_integration] Error 1

Could you please help to find a fix for this issue? cc: @jhass

@ysbaddaden
Copy link
Contributor

This is a Crystal bug.

@jhass
Copy link
Member

jhass commented Apr 8, 2020

In particular one it's the bug that Crystal currently fails running in parallel two times on the same source code. There's an issue or two around that but I cannot find it right now.

Anyhow, the workaround is easy for now, invoke make -j1 test. You may need to cleanup /build/.cache/crystal/ from the broken run first.

I'd also add an -f to the ln call in prepare. Finally the make install call lacks the PREFIX="$pkgdir/usr".

@straight-shoota
Copy link
Member

The compiler issue is tracked at crystal-lang/crystal#2351.

Closing as this is not a shards issue.

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

4 participants