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

Allow setting build vars manually #152

Open
the-eater opened this issue Apr 17, 2017 · 2 comments
Open

Allow setting build vars manually #152

the-eater opened this issue Apr 17, 2017 · 2 comments
Labels

Comments

@the-eater
Copy link

Currently Linenoise fails to build with:

===> Searching for: Task::Star
===> Searching for missing dependencies: Debugger::UI::CommandLine, ufo, XML::Writer, SVG, SVG::Plot, Terminal::ANSIColor, Test::Mock, Grammar::Profiler::Simple, Grammar::Debugger, JSON::Tiny, Digest::MD5, panda, HTTP::Status, HTTP::Easy, Template::Mojo, DBIish, URI
, Linenoise, LWP::Simple, JSON::RPC, Pod::To::HTML, p6doc, MIME::Base64, PSGI, Shell::Command, File::Find
===> Searching for missing dependencies: JSON::Fast, File::Which, OO::Monitors, NativeHelpers::Blob, LibraryMake, File::Temp, Pod::To::BigPage, IO::String
===> Searching for missing dependencies: IO::Socket::SSL, File::Directory::Tree
===> Searching for missing dependencies: OpenSSL
===> Building: Linenoise:ver('0.1.1'):auth('Rob Hoelz')
gcc: error: /void-packages/common/environment/configure/gccspecs/hardened-cc1: No such file or directory
make: *** [Makefile:12: linenoise.o] Error 1
The spawned command 'make' exited unsuccessfully (exit code: 2)
  in block <unit> at -e line 1

===> Building [FAIL]: Linenoise:ver('0.1.1'):auth('Rob Hoelz')
Aborting due to build failure: Linenoise:ver('0.1.1'):auth('Rob Hoelz')(use --force to override)
  in code  at /home/eater/.perl6/sources/4B1D5A60B59D9541E13F76E0E2A2D550E0144053 (Zef::Client) line 306
  in method build at /home/eater/.perl6/sources/4B1D5A60B59D9541E13F76E0E2A2D550E0144053 (Zef::Client) line 271
  in sub  at /home/eater/.perl6/sources/4B1D5A60B59D9541E13F76E0E2A2D550E0144053 (Zef::Client) line 489
  in method install at /home/eater/.perl6/sources/4B1D5A60B59D9541E13F76E0E2A2D550E0144053 (Zef::Client) line 600
  in sub MAIN at /home/eater/.perl6/sources/09969B10D9F270B8DBAAB9961FA7E6CDB8AD58C9 (Zef::CLI) line 139
  in block <unit> at /home/eater/.perl6/resources/85BD232410222F167A35B9969B036802FECD78D2 line 1

Context

I'm trying to build Noiseline this uses to build the C code LibraryMake, and this in turn uses the CFLAGS which were used to build VM. which are not applicable to my current environment. (VM is in this case built on a build server)

Expected Behavior

It would fail, but allow me to set CFLAGS within zef for Builders to use. most preffered way is via an static file

I understand this is currently a problem in LibraryMake then zef but it would be nice if this was globally solved

Actual Behavior

I need to edit LibraryMake to actually build things with it.

Steps to Reproduce

  1. touch /tmp/foo
  2. build and install MoarVM with CFLAGS=-specs=/tmp/foo
  3. remove /tmp/foo
  4. do zef install Noiseline

Build log (with --debug):

===> Searching for: Linenoise
===> Found: Linenoise:ver('0.1.1'):auth('Rob Hoelz')
===> Dependencies: LibraryMake
===> Searching for missing dependencies: LibraryMake
===> Found dependencies: LibraryMake:ver('1.0.0'):auth('github:retupmoca')
===> Dependencies: Shell::Command
===> Searching for missing dependencies: Shell::Command
===> Found dependencies: Shell::Command
===> Dependencies: File::Which, File::Find, Test
===> Searching for missing dependencies: File::Which, File::Find
===> Found dependencies: File::Find:ver('0.1'), File::Which
===> Dependencies: Test
===> Filtering: Linenoise:ver('0.1.1'):auth('Rob Hoelz')
===> Filtering [OK] for Linenoise:ver('0.1.1'):auth('Rob Hoelz')
===> Filtering: LibraryMake:ver('1.0.0'):auth('github:retupmoca')
===> Filtering [OK] for LibraryMake:ver('1.0.0'):auth('github:retupmoca')
===> Filtering: Shell::Command
===> Filtering [OK] for Shell::Command
===> Filtering: File::Find:ver('0.1')
===> Filtering [OK] for File::Find:ver('0.1')
===> Filtering: File::Which
===> Filtering [OK] for File::Which
===> # SKIP: No Build.pm for File::Which
===> # SKIP: No Build.pm for File::Find:ver('0.1')
===> # SKIP: No Build.pm for Shell::Command
===> # SKIP: No Build.pm for LibraryMake:ver('1.0.0'):auth('github:retupmoca')
===> Building: Linenoise:ver('0.1.1'):auth('Rob Hoelz')
Building with plugin: Zef::Service::Shell::Build+{<anon|94297161014400>}
Command: /usr/bin/perl6 -Ilib -I. -MBuild -I/home/eater/.zef/store/P6-LibraryMake.git/cb5bd3417f5fc812a9957d35a7df2b2bcf9a621c/lib -I/home/eater/.zef/store/Shell-Command.git/59b736a276823957f655d76ff994324ea5357898/lib -I/home/eater/.zef/store/perl6-file-which.git/4
4549a485798f1e3c4c2fbb1aececf02ee517b6a/lib -I/home/eater/.zef/store/File-Find.git/075720bde467460892fd3e326e139a9a926cbc8a/lib -e ::('Build').new.build('/home/eater/.zef/store/p6-linenoise.git/5ad368972e724bfd0921a1c610c2ffd04b389841'); exit(0);                    gcc -c -fPIC -Wdeclaration-after-statement -Werror=declaration-after-statement -O3 -DNDEBUG  -D_REENTRANT -D_FILE_OFFSET_BITS=64 -fPIC -specs=/void-packages/common/environment/configure/gccspecs/hardened-cc1  -fstack-protector-strong -D_FORTIFY_SOURCE=2 -mtune=gener
ic -O2 -pipe        -o  linenoise.o linenoise.c                                                                                                                                                                                                                           gcc: error: /void-packages/common/environment/configure/gccspecs/hardened-cc1: No such file or directory
make: *** [Makefile:12: linenoise.o] Error 1
The spawned command 'make' exited unsuccessfully (exit code: 2)
  in block <unit> at -e line 1

===> Building [FAIL]: Linenoise:ver('0.1.1'):auth('Rob Hoelz')
Aborting due to build failure: Linenoise:ver('0.1.1'):auth('Rob Hoelz')(use --force to override)
  in code  at /home/eater/.perl6/sources/4B1D5A60B59D9541E13F76E0E2A2D550E0144053 (Zef::Client) line 306
  in method build at /home/eater/.perl6/sources/4B1D5A60B59D9541E13F76E0E2A2D550E0144053 (Zef::Client) line 271
  in sub  at /home/eater/.perl6/sources/4B1D5A60B59D9541E13F76E0E2A2D550E0144053 (Zef::Client) line 489
  in method install at /home/eater/.perl6/sources/4B1D5A60B59D9541E13F76E0E2A2D550E0144053 (Zef::Client) line 600
  in sub MAIN at /home/eater/.perl6/sources/09969B10D9F270B8DBAAB9961FA7E6CDB8AD58C9 (Zef::CLI) line 139
  in block <unit> at /home/eater/.perl6/resources/85BD232410222F167A35B9969B036802FECD78D2 line 1

Your Environment

  • perl6 -v
This is Rakudo version 2017.03 built on MoarVM version 2017.03
implementing Perl 6.c.
  • perl6 -e 'say $*VM.config'

linux

@ugexe
Copy link
Owner

ugexe commented Apr 17, 2017

As you mentioned this is outside the scope of zef, although ultimately yes it should become globally solved via some build module which zef can use.

The Perl6 world currently uses Build.pm as our temporary solution to build hooks. For instance: https://github.com/hoelzro/p6-linenoise/blob/master/Build.pm (which can be run without a module installer). Unfortunately this means it is up to module authors to handle the problem.

As a workaround you can do something like:
zef look Linenoise
zef --depsonly install .
vi Build.pm # make appropriate edits
zef --debug install .

@ugexe ugexe changed the title Linenoise fails to build No way to set build vars manually Apr 17, 2017
@ugexe
Copy link
Owner

ugexe commented May 3, 2017

Here is a proposed solution to this issue: https://github.com/perl6/toolchain-bikeshed/blob/master/build.md

@ugexe ugexe added the feature label May 3, 2017
@ugexe ugexe changed the title No way to set build vars manually Allow setting build vars manually May 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants