Include and library path management

Hello, I’m porting this https://github.com/libretro/ludo/blob/master/.appveyor.yml to Travis for Windows.

I have to find a way for go get to find the headers of OpenAL.

And I also need to find a way for go build to link OpenAL.

I found how to do it in Appveyor but not on Travis yet.

Is there a cleaner way to achieve the same thing? My current changes are here https://github.com/libretro/ludo/pull/65/files

Hi @kivutar

Thanks for the message.

I can look at preinstalling OpenAL if that would be helpful?

Until then, I used Choco to install it (https://github.com/libretro/ludo/pull/67/files) but also have a failing build.

What I see is https://travis-ci.org/libretro/ludo/jobs/444183216#L73-L92

What is needed to be done next to get this to work?

Thanks for your reply @josh

I don’t know if it should be preinstalled. My intuition is that it shouldn’t. It’s not like GL or a compiler. But you know better than me.

About this OpenAL issue. The go binding of OpenAL is expecting the C compiler to know where to find AL/al.h.

For some reasons, the package on chocolatey doesn’t install these headers in an include path known by the default C compiler on travis’s windows.

Do you know what is and where is the default C compiler?
Do you know how to configure the include path?

I’m going to use dir /s al.h to check where chocolatey installs the OpenAL headers…

I think that having mingw-w64 preinstalled would help a lot of people.

It is preinstalled on AppVeyor too.

EDIT: mingw64 is there, in /c/Users/travis/

But make is missing

Hmmmmm, make should be there, as we install cmake (https://chocolatey.org/packages/cmake/3.12.2)

Good news is that we are planning to hire someone (or two) to help improve our Windows knowledge. Bad news is that you are stuck with me for a while until we do.

OpenAL has been installed here: https://travis-ci.org/libretro/ludo/jobs/444183216#L92

FYI I’m building a new image with a possible fix for make being missing.

Thank you @josh

For now I’m doing a choco install make which works well. I will try to remove it soon.

A new image is built and is live with https://chocolatey.org/packages/gnuwin32-make.portable installed.

Let me know if this works for you.

Did you get OpenAL working?

Yes, you fixed make:

https://travis-ci.org/libretro/ludo/jobs/444955212

I’ve got OpenAL working by downloading the binary package with wget, and configuring go to know the include path and ld path this way:

CGO_CFLAGS="-I/c/Users/travis/openal-soft-1.19.0-bin/include/" CGO_LDFLAGS="-L/c/Users/travis/openal-soft-1.19.0-bin/build/Release/"

There must be a cleaner way. But I think we can consider this an OpenAL or go-openal bug. Not a Travis bug.

Awesome, great to hear everything is working!