Include and library path management


#1

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


#2

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?


#3

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…


#4

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


#5

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


#6

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


#7

Thank you @josh

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


#8

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.


#9

Did you get OpenAL working?


#10

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.


#11

Awesome, great to hear everything is working!