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 failed on Ubuntu, ring couldn't be compiled #936

Closed
kariae opened this issue Feb 27, 2019 · 4 comments
Closed

Build failed on Ubuntu, ring couldn't be compiled #936

kariae opened this issue Feb 27, 2019 · 4 comments
Labels
no bug The reported bug was confirmed nonexistent upstream An unresolvable issue: an upstream dependency bug

Comments

@kariae
Copy link

kariae commented Feb 27, 2019

I did saw many issues with the same problem for Windows, and can't find a way to counter this (maybe using the master version).

I'm currently using Rocket v0.4.0 and on Ubuntu the build gives me this:

error: failed to run custom build command for `ring v0.13.5`
process didn't exit successfully: `/var/tmp/target/debug/build/ring-287c8798bcbd9041/build-script-build` (exit code: 101)
--- stdout
@jebrosen
Copy link
Collaborator

Does the output really end after --- stdout? If there's more there it will probably explain the problem. My first wild guess is that you are missing parts of the C toolchain for your platform (I believe apt install build-essentials will install them on Ubuntu)

It's definitely a problem with briansmith/ring and not Rocket so I'm going to close the issue, but feel free to follow up here.

@jebrosen jebrosen added no bug The reported bug was confirmed nonexistent upstream An unresolvable issue: an upstream dependency bug labels Feb 27, 2019
@kariae
Copy link
Author

kariae commented Feb 28, 2019

Thanks @jebrosen I think so also, here is what's after --- stdout


error: failed to run custom build command for `ring v0.13.5`
--
320 | process didn't exit successfully: `/drone/src/target/debug/build/ring-287c8798bcbd9041/build-script-build` (exit code: 101)
321 | --- stdout
322 | CARGO: /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo
323 | CARGO_CFG_DEBUG_ASSERTIONS:
324 | CARGO_CFG_PROC_MACRO:
325 | CARGO_CFG_TARGET_ARCH: aarch64
326 | CARGO_CFG_TARGET_ENDIAN: little
327 | CARGO_CFG_TARGET_ENV: gnu
328 | CARGO_CFG_TARGET_FAMILY: unix
329 | CARGO_CFG_TARGET_FEATURE: fp,neon
330 | CARGO_CFG_TARGET_HAS_ATOMIC: 128,16,32,64,8,cas,ptr
331 | CARGO_CFG_TARGET_OS: linux
332 | CARGO_CFG_TARGET_POINTER_WIDTH: 64
333 | CARGO_CFG_TARGET_THREAD_LOCAL:
334 | CARGO_CFG_TARGET_VENDOR: unknown
335 | CARGO_CFG_UNIX:
336 | CARGO_FEATURE_DEFAULT: 1
337 | CARGO_FEATURE_DEV_URANDOM_FALLBACK: 1
338 | CARGO_FEATURE_USE_HEAP: 1
339 | CARGO_HOME: /root/.cargo
340 | CARGO_MAKEFLAGS: --jobserver-fds=3,5 -j --jobserver-auth=3,5 -j
341 | CARGO_MANIFEST_DIR: /root/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.5
342 | CARGO_MANIFEST_LINKS: ring-asm
343 | CARGO_PKG_AUTHORS: Brian Smith <brian@briansmith.org>
344 | CARGO_PKG_DESCRIPTION: Safe, fast, small crypto using Rust.
345 | CARGO_PKG_HOMEPAGE:
346 | CARGO_PKG_NAME: ring
347 | CARGO_PKG_REPOSITORY: https://github.com/briansmith/ring
348 | CARGO_PKG_VERSION: 0.13.5
349 | CARGO_PKG_VERSION_MAJOR: 0
350 | CARGO_PKG_VERSION_MINOR: 13
351 | CARGO_PKG_VERSION_PATCH: 5
352 | CARGO_PKG_VERSION_PRE:
353 | CI: true
354 | CI_BUILD_FINISHED: 1551339978
355 | CI_BUILD_STARTED: 1551339976
356 | CI_BUILD_STATUS: success
357 | CI_JOB_FINISHED: 1551339978
358 | CI_JOB_STARTED: 1551339976
359 | CI_JOB_STATUS: success
360 | CI_NETRC_MACHINE: github.com
361 | CI_WORKSPACE: /drone/src
362 | CI_WORKSPACE_BASE: /drone/src
363 | CI_WORKSPACE_PATH:
364 | DEBUG: true
365 | DRONE: true
366 | DRONE_BRANCH: master
367 | DRONE_BUILD_ACTION:
368 | DRONE_BUILD_CREATED: 1551339976
369 | DRONE_BUILD_EVENT: push
370 | DRONE_BUILD_FINISHED: 1551339978
371 | DRONE_BUILD_LINK: https://drone.a101.co/kariae/backupio-client/11
372 | DRONE_BUILD_NUMBER: 11
373 | DRONE_BUILD_STARTED: 1551339976
374 | DRONE_BUILD_STATUS: success
375 | DRONE_COMMIT: 393e9a1a39107615e6221a929db3fdd9e0bcd84e
376 | DRONE_COMMIT_AFTER: 393e9a1a39107615e6221a929db3fdd9e0bcd84e
377 | DRONE_COMMIT_AUTHOR: kariae
378 | DRONE_COMMIT_AUTHOR_AVATAR: https://avatars2.githubusercontent.com/u/26310353?v=4
379 | DRONE_COMMIT_AUTHOR_EMAIL: z.filali@a101.com
380 | DRONE_COMMIT_AUTHOR_NAME: Zakariae Filali
381 | DRONE_COMMIT_BEFORE: 1a055e404978e42332d9f21569e440c203daf444
382 | DRONE_COMMIT_BRANCH: master
383 | DRONE_COMMIT_LINK: https://github.com/kariae/backupio-client/compare/1a055e404978...393e9a1a3910
384 | DRONE_COMMIT_MESSAGE: [WIP] CI
385 | DRONE_COMMIT_REF: refs/heads/master
386 | DRONE_COMMIT_SHA: 393e9a1a39107615e6221a929db3fdd9e0bcd84e
387 | DRONE_DEPLOY_TO:
388 | DRONE_GIT_HTTP_URL: https://github.com/kariae/backupio-client.git
389 | DRONE_GIT_SSH_URL: git@github.com:kariae/backupio-client.git
390 | DRONE_JOB_FINISHED: 1551339978
391 | DRONE_JOB_STARTED: 1551339976
392 | DRONE_JOB_STATUS: success
393 | DRONE_MACHINE: a5499ccc3f2f
394 | DRONE_NETRC_MACHINE: github.com
395 | DRONE_REMOTE_URL: https://github.com/kariae/backupio-client.git
396 | DRONE_REPO: kariae/backupio-client
397 | DRONE_REPO_BRANCH: master
398 | DRONE_REPO_LINK: https://github.com/kariae/backupio-client
399 | DRONE_REPO_NAME: backupio-client
400 | DRONE_REPO_NAMESPACE: kariae
401 | DRONE_REPO_OWNER: kariae
402 | DRONE_REPO_PRIVATE: true
403 | DRONE_REPO_SCM:
404 | DRONE_REPO_VISIBILITY: private
405 | DRONE_RUNNER_HOST: a5499ccc3f2f
406 | DRONE_RUNNER_HOSTNAME: a5499ccc3f2f
407 | DRONE_RUNNER_PLATFORM: linux/amd64
408 | DRONE_SOURCE_BRANCH: master
409 | DRONE_STEP_NAME: build
410 | DRONE_STEP_NUMBER: 2
411 | DRONE_SYSTEM_HOST: drone.a101.co
412 | DRONE_SYSTEM_HOSTNAME: drone.a101.co
413 | DRONE_SYSTEM_PROTO: https
414 | DRONE_SYSTEM_VERSION: 1.0.0-rc.5
415 | DRONE_TARGET_BRANCH: master
416 | DRONE_WORKSPACE: /drone/src
417 | DRONE_WORKSPACE_BASE: /drone/src
418 | DRONE_WORKSPACE_PATH:
419 | HOME: /root
420 | HOST: x86_64-unknown-linux-gnu
421 | HOSTNAME: 269cd7dab7cf
422 | LD_LIBRARY_PATH: /drone/src/target/debug/deps:/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib
423 | NUM_JOBS: 1
424 | OPT_LEVEL: 0
425 | OUT_DIR: /drone/src/target/aarch64-unknown-linux-gnu/debug/build/ring-365576fc52d5c2bd/out
426 | PATH: /root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin
427 | PROFILE: debug
428 | PWD: /drone/src
429 | RUSTC: rustc
430 | RUSTDOC: rustdoc
431 | RUSTUP_HOME: /root/.rustup
432 | RUSTUP_TOOLCHAIN: nightly-x86_64-unknown-linux-gnu
433 | RUST_RECURSION_COUNT: 1
434 | SSL_CERT_DIR: /usr/lib/ssl/certs
435 | SSL_CERT_FILE: /usr/lib/ssl/certs/ca-certificates.crt
436 | TARGET: aarch64-unknown-linux-gnu
437 | USER: root
438 | OPT_LEVEL = Some("0")
439 | TARGET = Some("aarch64-unknown-linux-gnu")
440 | HOST = Some("x86_64-unknown-linux-gnu")
441 | CC_aarch64-unknown-linux-gnu = None
442 | CC_aarch64_unknown_linux_gnu = None
443 | TARGET_CC = None
444 | CC = None
445 | CROSS_COMPILE = None
446 | CFLAGS_aarch64-unknown-linux-gnu = None
447 | CFLAGS_aarch64_unknown_linux_gnu = None
448 | TARGET_CFLAGS = None
449 | CFLAGS = None
450 | DEBUG = Some("true")
451 | running "aarch64-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-declarations" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-Wno-cast-align" "-fstack-protector" "-g3" "-D_XOPEN_SOURCE=700" "-c" "-o/drone/src/target/aarch64-unknown-linux-gnu/debug/build/ring-365576fc52d5c2bd/out/aesv8-armx-linux64.o" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.5/pregenerated/aesv8-armx-linux64.S"
452 |  
453 | --- stderr
454 | thread 'main' panicked at 'failed to execute ["aarch64-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-declarations" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-Wno-cast-align" "-fstack-protector" "-g3" "-D_XOPEN_SOURCE=700" "-c" "-o/drone/src/target/aarch64-unknown-linux-gnu/debug/build/ring-365576fc52d5c2bd/out/aesv8-armx-linux64.o" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.5/pregenerated/aesv8-armx-linux64.S"]: No such file or directory (os error 2)', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.13.5/build.rs:642:9
455 | note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

I'll open an issue regarding that in ring repo, I'm just checking cause in Rocket we don't have the latest version from Ring (maybe they fixed the issue), and from here it says that we can disable the support for private cookies, does it still build Ring even if we disable the private cookies?
By the way I installed build-essential but it didn't fixed the issue.

@jebrosen
Copy link
Collaborator

jebrosen commented Mar 2, 2019

aarch64-linux-gnu-gcc

I didn't realize you were compiling for aarch64. You would need to install a cross-compilation toolchain, then, but I don't know what Ubuntu names those packages.

I'll open an issue regarding that in ring repo

Based on #905 and briansmith/ring#628, I believe that version of ring does have problems on aarch64, but not the ones you described. I didn't see any issues with building it, just some particular functionality failing at runtime.

does it still build Ring even if we disable the private cookies?

Disabling private-cookies should disable the dependency on ring. If you use rocket_contrib, it currently will still pull in ring because #908 isn't in a release yet.

@kariae
Copy link
Author

kariae commented Mar 2, 2019

Hum, I found a fix using clang as described in #briansmoth/ring#784

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no bug The reported bug was confirmed nonexistent upstream An unresolvable issue: an upstream dependency bug
Projects
None yet
Development

No branches or pull requests

2 participants