Code Monkey home page Code Monkey logo

Comments (9)

evangreen avatar evangreen commented on July 18, 2024

It's funny, most of the initial packages we ported didn't seem to even ask about pkg-config, while recently I've found myself mired in pkg-config stuff.

What I'd been doing up until this point is working around the lack of pkg-config. There are usually environment variables you can set to quell pkg-config dependencies during configure (eg SOMEPKG_CFLAGS and SOMEPKG_LIBS). See https://gitlab.com/minoca/third-party/blob/master/build/gnutls-3.5.3/build.sh for an example.

It might be a good idea to add pkg-config though, as this seems to be coming up more and more. But the problem with adding it to the win32 repository is we're just going to have the same problem on macOS, Minoca, and maybe Linux depending on the distro.

Since we already have pkg-config in the repository, it would probably be better to try and light it up as a "tool", so it builds for the build machine as well as the Minoca package. The diffs between a third-party package with tools and one without is pretty minimal, diff against third-party/flex-2.5.39/Makefile for an example. The build.sh changes are also pretty self apparent. The part that can be tricky is to get it to build for Windows (sometimes macOS is tricky too).

What do you think?

from os.

vascocosta avatar vascocosta commented on July 18, 2024

Those SOMEPKG_CFLAGS/SOMEPKG_LIBS are quite a nice workaround for pkg-config, however setting GLIB_CFLAGS/GLIB_LIBS when trying to build irssi doesn't seem to work and configure bails out. Apparently irssi's configure script only cares for SSL_* ones and always calls pkg-config for glib.

Your suggestion to convert pkg-build to a tool seems quite logical to me. I'm not sure I'll be able to successfully build it that way though. Nevertheless I'll get my hands dirty for the sake of learning more if nothing else.

Meanwhile, if you find a quicker way which allows the irssi package I submitted to build without a pkg-config.exe on Windows, please let me know.

from os.

evangreen avatar evangreen commented on July 18, 2024

I played with it a little last night and managed to get pkg-config building as a tool on windows. I'll attach my third-party/build/pkg-config-0.29.1 directory here for you. The diff has changed, so make sure to do a make clean in pkg-config first. But I was unable to use that new pkg-config to build irssi. I didn't try very hard though, as I was hungry. I'll try again later, or let me know if you find the trick first. Perhaps pkg-config didn't build right.
pkg-config-0.29.1.zip

I'll also need to try my pkg-config changes on macOS and Linux.

from os.

vascocosta avatar vascocosta commented on July 18, 2024

Good job.

I was able to build pkg-config from your new recipe, but I don't see any pkg-config.exe being generated, only the Minoca ELF at x86dbg\obj\third-party\pkg-config-0.29.1.build\build.out\usr\bin.

Shouldn't there also be a x86dbg\obj\third-party\pkg-config-0.29.1.tool where Windows executables are staged?

As soon as you can generate a pkg-config.exe, adding "export PKG_CONFIG=path_to_pkg.config.exe" to irssi's build.sh script near PKG_CONFIG_PATH=$DEPENDROOT/usr/lib/pkgconfig/ will surely work. I managed to build it before this way, using a win32 pkg-config binary I downloaded from freedesktop.

from os.

evangreen avatar evangreen commented on July 18, 2024

Yes, there should be a pkg-config-0.29.1.tool directory. Are you running "make tools" from within third-party/build/pkg-config-0.29.1?

from os.

vascocosta avatar vascocosta commented on July 18, 2024

My bad... Temporary brain fade, sorry. :)

from os.

vascocosta avatar vascocosta commented on July 18, 2024

I just successfully compiled irssi, this time using your pkg-config tool built for Windows!

I simply added:

if test "x$BUILD_OS" = "xwin32"; then
    export PKG_CONFIG="$SRCROOT/$ARCH$VARIANT$DEBUG/tools/bin/pkg-config.exe"
fi

Here's the updated build folder:

http://hydrogen.geekzone.tk:23720/minoca/packages/0.3/i686/main/irssi-0.8.20.zip

Let me know if you still have any issues.

from os.

evangreen avatar evangreen commented on July 18, 2024

Okay, with a little tweaking I was able to get this to build with pkg-config built as tools. I've pushed those changes to third-party. Thanks for putting irssi together, I'm excited to try it out.

Closing this now.

from os.

vascocosta avatar vascocosta commented on July 18, 2024

Thanks @evangreen, good job again, fixing this issue and helping out with irssi.

I had missed the extra dependencies you added probably because I did a "make" inside third-party early on, so I already had ALL packages built and irssi was therefore building successfully too. This way I was wrongly assuming all the dependencies were met when they weren't. Something to take into consideration now that I'll create more packages.

from os.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.