treasure-data/omnibus-td-agent

Trying to execute ./configure on Windows 10

philipsabri opened this issue · 13 comments

Im using this to build a .msi installer. I get this error and I cant find anything to solve it. Tried to change it from "./configure" to "configure" but didnt work. Cant even find the supposed configure file its trying to execute.

[Builder: libffi] I | 2020-03-03T03:00:26-08:00 | $ ./configure --build=x86_64-w64-mingw32 --prefix=C:/opt/td-agent/embedded --disable-multi-os-directory
        [Builder: libffi] I | 2020-03-03T03:00:26-08:00 | Execute: `./configure --build=x86_64-w64-mingw32 --prefix=C:/opt/td-agent/embedded --disable-multi-os-directory': 0.047s

...

    '.' is not recognized as an internal or external command,
operable program or batch file.

Did this on ruby 2.4 as 2.3.1 couldnt build omnious

How are you building your .msi installer?

Still trying to get it to work, but are you still using chefdk 3.2.23? Just making sure as the guide hasnt been updated in a while. @repeatedly

The omnibus-toolchain is missing some stuff, etc had to install the mingw-w64-x86_64-toolchain manually.

C:\opscode\omnibus-toolchain\embedded\bin\etc\msys2.bashrc: line 83: /etc/profile.d/perlbin.sh: No such file or directory

even tho I have the file in C:\opscode\omnibus-toolchain\embedded\git\etc\profile.d\...
Now I get this, so feels like a lot of stuff is missing. Have tried different chefdk versions.

are you still using chefdk 3.2.23?

Yes but I uses windows 2012 R2 environment. I didn't test the build on Windows 10.

@cosmo0920 What the version do you use for build test?

I used Windows 10 1909 and I didn't use chefdk.
I used MSYS2 and Ruby 2.5.6 to build package.

I use this procedure: https://github.com/treasure-data/omnibus-td-agent/blob/master/td-agent-on-windows.md

I used Windows 10 1909 and I didn't use chefdk.
I used MSYS2 and Ruby 2.5.6 to build package.

I use this procedure: https://github.com/treasure-data/omnibus-td-agent/blob/master/td-agent-on-windows.md

@cosmo0920 Do you run everything in powershell/cmd and not bash?

Yes. I built omnibus-td-agent within PowerShell Core 6 (which is almost equivalent to built-in PowerShell).

@cosmo0920 hmm.. Still not working, tried with ruby 2.5.6 and Powershell Core 6. Still getting stuck on the ./configure error

Are you downloading Ruby + Devkit from rubyinstaller or getting them separately?
As the Devkit is for 2.0-2.3 or something?

Would be really optimal if there was a docker image with the exactly working environment, or an VHD file that you could boot up in a VM. @repeatedly

I use Ruby 2.5.6 (RubyInstaller with Devkit) and use MSYS2 through ridk exec.
I can work to prepare Windows docker building environment.

I can work to prepare Windows docker building environment.

That would be really great!

ridk exec worked for me, thank you @cosmo0920 (not finished yet, but seemes to work)

I have some other questions:
When using the ridk exec it only wants to use c:\msys2 which is not the default path, no problem just rename and re-path, but is there a way to change that or how did you do it if you stumbled across the same problem

I also noticed when for example building and there was a missing path and you add it and rebuild it always get stuck on nokigiri with errors, so I had to do the bin/omnibus clean td-agent3 --purge is there anyway to just clean one of the building parts, tried to remove files here and there but nothing seemed to work... takes a lot of time to rebuild everything.

When using the ridk exec it only wants to use c:\msys2 which is not the default path, no problem just rename and re-path, but is there a way to change that or how did you do it if you stumbled across the same problem

I just created symlink for C:\msys2 which links to C:\msys64(installation directory).

I also noticed when for example building and there was a missing path and you add it and rebuild it always get stuck on nokigiri with errors, so I had to do the bin/omnibus clean td-agent3 --purge is there anyway to just clean one of the building parts, tried to remove files here and there but nothing seemed to work... takes a lot of time to rebuild everything.

I just purged staging directories entirely.
Yeah, this way consumes a lot of time.

When using the ridk exec it only wants to use c:\msys2 which is not the default path, no problem just rename and re-path, but is there a way to change that or how did you do it if you stumbled across the same problem

I just created symlink for C:\msys2 which links to C:\msys64(installation directory).

I also noticed when for example building and there was a missing path and you add it and rebuild it always get stuck on nokigiri with errors, so I had to do the bin/omnibus clean td-agent3 --purge is there anyway to just clean one of the building parts, tried to remove files here and there but nothing seemed to work... takes a lot of time to rebuild everything.

I just purged staging directories entirely.
Yeah, this way consumes a lot of time.

Thanks!

Another question while am at it, is it possible to include files in the msi installer, I know you can edit td-agent.conf but is it possible to like put in an extra file of something