configuring b2 via appveyor

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

configuring b2 via appveyor

Boost - Build mailing list

Hello,

I'm trying to fix the appveyor setup for Boost.GIL, where I need to create a `user-config.jam` file with entries for third-party libraries libjpeg, libpng, libz, and libtiff.

While this isn't a problem with bash on travis-ci, I have a hard time doing the equivalent with appveyor, presumably because I'm unable to work out how this is spelled with cmd.exe or the PowerShell.

Here is my appveyor script:

https://github.com/boostorg/gil/blob/WIP/testing/.appveyor.yml#L82-L91

and here is the error this results in:

https://ci.appveyor.com/project/stefanseefeld/gil/build/1.0.109-develop/job/n6yco00602f8pqn7#L974

I'm sure I'm not the first one to attempt to do this (i.e., create a custom user-config.jam on appveyor). Can someone see what I'm doing wrong ?

Thanks,


Stefan
-- 

      ...ich hab' noch einen Koffer in Berlin...
    

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: configuring b2 via appveyor

Boost - Build mailing list
AMDG

On 12/04/2017 08:51 AM, Stefan Seefeld via Boost-build wrote:

>
> I'm trying to fix the appveyor setup for Boost.GIL, where I need to create a
> `user-config.jam` file with entries for third-party libraries libjpeg, libpng,
> libz, and libtiff.
>
> <snip>
> and here is the error this results in:
>
> https://ci.appveyor.com/project/stefanseefeld/gil/build/1.0.109-develop/job/n6yco00602f8pqn7#L974
>
> I'm sure I'm not the first one to attempt to do this (i.e., create a custom
> user-config.jam on appveyor). Can someone see what I'm doing wrong ?
>

  This looks like a permissions issue.  You can
either use project-config.jam (b2 finds it in the
current working directory or its parents) or
pass the config file explicitly on the command
line with --user-config=path/to/user-config.jam

In Christ,
Steven Watanabe

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: configuring b2 via appveyor

Boost - Build mailing list
On 05.12.2017 17:34, Steven Watanabe via Boost-build wrote:
AMDG

On 12/04/2017 08:51 AM, Stefan Seefeld via Boost-build wrote:
I'm trying to fix the appveyor setup for Boost.GIL, where I need to create a 
`user-config.jam` file with entries for third-party libraries libjpeg, libpng, 
libz, and libtiff.

<snip>
and here is the error this results in:

https://ci.appveyor.com/project/stefanseefeld/gil/build/1.0.109-develop/job/n6yco00602f8pqn7#L974

I'm sure I'm not the first one to attempt to do this (i.e., create a custom 
user-config.jam on appveyor). Can someone see what I'm doing wrong ?

  This looks like a permissions issue.  You can
either use project-config.jam (b2 finds it in the
current working directory or its parents) or
pass the config file explicitly on the command
line with --user-config=path/to/user-config.jam
Hmm, so I replaced `%HOMEDRIVE%%HOMEPATH%\user-config.jam` with just `config.jam`, and got the exact same error "the system cannot find the file specified". Not very helpfull... :-(

(https://ci.appveyor.com/project/stefanseefeld/gil/build/1.0.110-develop/job/i2adtwjlddoq62m0)

Thanks,


Stefan
-- 

      ...ich hab' noch einen Koffer in Berlin...
    

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: configuring b2 via appveyor

Boost - Build mailing list
Hmm, so I replaced `%HOMEDRIVE%%HOMEPATH%\user-config.jam` with just `config.jam`, and got the exact same error "the system cannot find the file specified". Not very helpfull... :-(

(https://ci.appveyor.com/project/stefanseefeld/gil/build/1.0.110-develop/job/i2adtwjlddoq62m0)


Is it correct to think that this has nothing to do with boost and is just a Windows/appveyor issue? If so, Stefan, can you create a script that only does the part causing the error. I like to take this to stackoverflow 

Thanks,
Christian


 

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: configuring b2 via appveyor

Boost - Build mailing list
On 06.12.2017 10:54, Christian Henning wrote:
Hmm, so I replaced `%HOMEDRIVE%%HOMEPATH%\user-config.jam` with just `config.jam`, and got the exact same error "the system cannot find the file specified". Not very helpfull... :-(

(https://ci.appveyor.com/project/stefanseefeld/gil/build/1.0.110-develop/job/i2adtwjlddoq62m0)


Is it correct to think that this has nothing to do with boost and is just a Windows/appveyor issue?

So it seems. So far I haven't even be able to reproduce the error in my local Windows VM. And not being a regular Windows user (and much less developer), I feel like I'm totally in the dark.

If so, Stefan, can you create a script that only does the part causing the error. I like to take this to stackoverflow

I have reduced the .appveyor.yml script to this: https://github.com/boostorg/gil/blob/bug/.appveyor.yml, which still yields the error:
https://ci.appveyor.com/project/stefanseefeld/gil/build/job/fq00n0ubk2gf0qjb


Stefan
-- 

      ...ich hab' noch einen Koffer in Berlin...
    

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: configuring b2 via appveyor

Boost - Build mailing list
In reply to this post by Boost - Build mailing list
On 05.12.2017 17:34, Steven Watanabe via Boost-build wrote:
AMDG

On 12/04/2017 08:51 AM, Stefan Seefeld via Boost-build wrote:
I'm trying to fix the appveyor setup for Boost.GIL, where I need to create a 
`user-config.jam` file with entries for third-party libraries libjpeg, libpng, 
libz, and libtiff.

<snip>
and here is the error this results in:

https://ci.appveyor.com/project/stefanseefeld/gil/build/1.0.109-develop/job/n6yco00602f8pqn7#L974

I'm sure I'm not the first one to attempt to do this (i.e., create a custom 
user-config.jam on appveyor). Can someone see what I'm doing wrong ?

  This looks like a permissions issue. 

It doesn't appear to be one. This fails: https://ci.appveyor.com/project/stefanseefeld/gil/build/1.0.114-bug/job/c2ssclb178o24hfl
while this works: https://ci.appveyor.com/project/stefanseefeld/gil/build/1.0.113-bug/job/g82xoju5fpv52gxe

So the error seems related to the use of the %CHUNK% variable, which is defined as

set "CHUNK=^<include^>%VCPKG%\include ^<search^>%VCPKG%\lib"

(I can't claim I understand the syntax. https://stackoverflow.com/questions/47679060/permission-issue-with-simple-appveyor-script suggests I need to quote the entire assignment rather than just the right-side hand, to avoid the quotation marks to be included in the variable. And I need the '^' to prevent cmd.exe from interpreting the  '>' character in the value...)

This is why I had hoped that someone else had already generated user-config.jam files in appveyor.yml files, so I could simply learn from that experience, rather than stumbling around in the dark as I do now.

Thanks,

Stefan
-- 

      ...ich hab' noch einen Koffer in Berlin...
    

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: configuring b2 via appveyor

Boost - Build mailing list
AMDG

On 12/06/2017 04:47 PM, Stefan Seefeld via Boost-build wrote:

> <snip>
> So the error seems related to the use of the %CHUNK% variable, which is defined as
>
> set "CHUNK=^<include^>%VCPKG%\include ^<search^>%VCPKG%\lib"
>
> (I can't claim I understand the syntax.
> https://stackoverflow.com/questions/47679060/permission-issue-with-simple-appveyor-script 
> suggests I need to quote the entire assignment rather than just the right-side
> hand, to avoid the quotation marks to be included in the variable. And I need
> the '^' to prevent cmd.exe from interpreting the  '>' character in the value...)
>

  I tried pasting it into a batch file and
it seems to work.  Obviously appveyor is
doing something subtly different, but it
isn't exactly clear what.  It seems like it's
getting one extra round of evaluation, somehow.

> This is why I had hoped that someone else had already generated user-config.jam
> files in appveyor.yml files, so I could simply learn from that experience,
> rather than stumbling around in the dark as I do now.
>

  You can avoid using user-config.jam for this
by setting the environmental variables,
ZLIB_INCLUDE/ZLIB_LIBRARY_PATH (and similar
variables for the other libraries).  It will
probably also work if you use
b2 ... include=%VCPKG%\include library-path=%VCPKG%\lib
although I don't think I've actually tested this.

In Christ,
Steven Watanabe

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: configuring b2 via appveyor

Boost - Build mailing list
On 06.12.2017 19:45, Steven Watanabe via Boost-build wrote:
[...]

  I tried pasting it into a batch file and
it seems to work.  Obviously appveyor is
doing something subtly different, but it
isn't exactly clear what.  It seems like it's
getting one extra round of evaluation, somehow.

Yeah, I couldn't reproduce the error outside appveyor either.
This is why I had hoped that someone else had already generated user-config.jam 
files in appveyor.yml files, so I could simply learn from that experience, 
rather than stumbling around in the dark as I do now.

  You can avoid using user-config.jam for this
by setting the environmental variables,
ZLIB_INCLUDE/ZLIB_LIBRARY_PATH (and similar
variables for the other libraries).  It will
probably also work if you use
b2 ... include=%VCPKG%\include library-path=%VCPKG%\lib
although I don't think I've actually tested this.

OK, that seems to work fine indeed. Thanks !

Stefan
-- 

      ...ich hab' noch einen Koffer in Berlin...
    

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: configuring b2 via appveyor

Boost - Build mailing list
Here is another idea plus explanation for the weird behavior:


I'm not really a big fan of powershell. Is there an image on appveyor which has git bash or similar installed? If not, would it be hard to install bash before the installation?

Regards,
Christian



On Wed, Dec 6, 2017 at 9:56 PM, Stefan Seefeld via Boost-build <[hidden email]> wrote:
On 06.12.2017 19:45, Steven Watanabe via Boost-build wrote:
[...]

  I tried pasting it into a batch file and
it seems to work.  Obviously appveyor is
doing something subtly different, but it
isn't exactly clear what.  It seems like it's
getting one extra round of evaluation, somehow.

Yeah, I couldn't reproduce the error outside appveyor either.
This is why I had hoped that someone else had already generated user-config.jam 
files in appveyor.yml files, so I could simply learn from that experience, 
rather than stumbling around in the dark as I do now.

  You can avoid using user-config.jam for this
by setting the environmental variables,
ZLIB_INCLUDE/ZLIB_LIBRARY_PATH (and similar
variables for the other libraries).  It will
probably also work if you use
b2 ... include=%VCPKG%\include library-path=%VCPKG%\lib
although I don't think I've actually tested this.

OK, that seems to work fine indeed. Thanks !

Stefan
-- 

      ...ich hab' noch einen Koffer in Berlin...
    

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build



_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: configuring b2 via appveyor

Boost - Build mailing list
On 07.12.2017 08:32, Christian Henning wrote:
Here is another idea plus explanation for the weird behavior:


I see ! Thanks, that's really helpful to know.


I'm not really a big fan of powershell. Is there an image on appveyor which has git bash or similar installed? If not, would it be hard to install bash before the installation?

Why this complexity ? The answer you are referring above suggests a rather simple solution: move the config-generating logic into a .cmd file and execute that.
Much simpler and efficient than installing yet another package on each run !
And it works: :-)

https://github.com/boostorg/gil/commit/60decff806c091f5e9854c45ab39828dc4c35bba
https://ci.appveyor.com/project/stefanseefeld/gil/build/1.0.131-bug/job/cnec52od678nscnn

(That being said, I see no reason to change what's already working now: Steven's suggestion to use <include> and <library-path> directly when invoking `b2`. But it's certainly useful to keep in mind if ever we need a more complex config file in the future.)

Stefan
-- 

      ...ich hab' noch einen Koffer in Berlin...
    

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build