Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building fails on Arch Linux #7

Closed
Photon89 opened this issue Mar 28, 2017 · 19 comments
Closed

Building fails on Arch Linux #7

Photon89 opened this issue Mar 28, 2017 · 19 comments
Labels

Comments

@Photon89
Copy link

Photon89 commented Mar 28, 2017

Building fails on Arch Linux with

...
linking: python/libjngl.so
/bin/ld: cannot find -lboost_python-py36
collect2: error: ld returned 1 exit status
scons: *** [python/libjngl.so] Error 1
scons: building terminated because of errors.

Installed packages: python 3.6.0, boost 1.63.0.

@jhasse
Copy link
Owner

jhasse commented Mar 29, 2017

Just tried it myself: The reason is that this check fails: https://github.com/jhasse/jngl/blob/master/SConstruct#L110

If you look at the config.log, you should see undefined references to Py functions. But the check is only to find out if the lib exists ... Maybe that's a bug in SCons?

I'm thinking about porting the build system to Waf soon anyway. In the meantime you can just add or True: to the if condition in line 110.

@Photon89
Copy link
Author

Didn't quite get it, where exactly to add the or True: line. 😄

@jhasse
Copy link
Owner

jhasse commented Apr 6, 2017

This one https://github.com/jhasse/jngl/blob/master/SConstruct#L110, so that it becomes:

	if conf.CheckLib(["boost_python3"]) or True:

@jhasse jhasse added the Linux label Nov 23, 2017
@jhasse jhasse closed this as completed in 0a8bf20 Dec 15, 2017
@Photon89
Copy link
Author

The new instructions don't seem to work, the meson command fails with:

Error during basic setup:

Neither directory contains a build file meson.build.

@jhasse
Copy link
Owner

jhasse commented Jan 2, 2018

Is your Git checkout up-to-date? The meson.build file is here: https://github.com/jhasse/jngl/blob/master/meson.build

@Photon89
Copy link
Author

Photon89 commented Jan 2, 2018

I was trying to build the latest release version, 1.2.0.

@jhasse
Copy link
Owner

jhasse commented Jan 2, 2018

Ah! I haven't updated that in a while, sorry. I'll fix the Windows build ASAP and then tag 1.3.0.

Does the master branch work for you though?

@Photon89
Copy link
Author

Photon89 commented Jan 2, 2018

To be honest, no idea. :) I don't use the library myself, I have created a PKGBUILD for it as dependency for another package but eventually I didn't write the other package and jngl just kept hanging in the AUR. Since it's already there I'd be glad to fix it but I won't be able to do any testing.

@jhasse
Copy link
Owner

jhasse commented Jan 2, 2018

I see. This one https://aur.archlinux.org/packages/jngl/ ?

@Photon89
Copy link
Author

Photon89 commented Jan 2, 2018

Yes, exactly!

@jhasse
Copy link
Owner

jhasse commented Jan 9, 2018

Okay I've pushed v1.3.0, can you test it?

btw: The Python 2 patch won't work anymore, JNGL needs 3 now.

@jhasse jhasse reopened this Jan 9, 2018
@Photon89
Copy link
Author

Photon89 commented Feb 3, 2018

Sorry for the late reply. Now meson runs through, however, ninja fails with:

ninja: error: loading 'build.ninja': No such file or directory

@jhasse
Copy link
Owner

jhasse commented Feb 6, 2018

Hm ... that's strange. Meson should have created that file. Is the build directory empty?

@Photon89
Copy link
Author

Sorry for late reply. Yes, I tried with a clean build directory. The total output is:

The Meson build system
Version: 0.44.0
Source dir: /media/Daten/PKGBUILDS/jngl/src/jngl-1.3.0
Build dir: /media/Daten/PKGBUILDS/jngl/src/jngl-1.3.0/build
Build type: native build
Project name: jngl
Native C compiler: cc (gcc 7.3.0)
Appending CFLAGS from environment: '-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong'
Appending LDFLAGS from environment: '-Wl,-O1,--sort-common,--as-needed,-z,relro'
Appending CPPFLAGS from environment: '-D_FORTIFY_SOURCE=2'
Native C   compiler: c   (gcc 7.3.0)
Appending CXXFLAGS from environment: '-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong'
Appending LDFLAGS from environment: '-Wl,-O1,--sort-common,--as-needed,-z,relro'
Appending CPPFLAGS from environment: '-D_FORTIFY_SOURCE=2'
Build machine cpu family: x86_64
Build machine cpu: x86_64
Library GL found: YES
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Native dependency sdl2 found: YES 2.0.7
Native dependency fontconfig found: YES 2.12.6
Native dependency libjpeg found: YES 1.5.3
Dependency threads found: YES
Native dependency freetype2 found: YES 22.0.16
Native dependency glew found: YES 2.1.0
Native dependency libwebp found: YES 0.6.1
Native dependency libpng found: YES 1.6.34
Native dependency openal found: YES 1.18.2
Native dependency vorbisfile found: YES 1.3.5
Dependency Boost (python3) found: YES 1.66
Native dependency python3 found: YES 3.6
Build targets in project: 3
Found ninja-1.8.2 at /usr/bin/ninja
==> Betrete fakeroot Umgebung...
==> Beginne package()...
ninja: error: loading 'build.ninja': No such file or directory

@jhasse
Copy link
Owner

jhasse commented Mar 12, 2018

Can you share the PKGBUILD?

@Photon89
Copy link
Author

Sure! Here it is: https://pastebin.com/Apgri1eM

@jhasse
Copy link
Owner

jhasse commented Mar 12, 2018

Thanks! It seems that package() resets the working directory, that's why it couldn't find the ninja.build file in the build directory.

I've also noticed that Meson didn't install any files yet ... which I fixed in v1.3.1. This is the PKGBUILD which worked for me:

pkgname=jngl
pkgver=1.3.1
pkgrel=1
pkgdesc="One of the easiest 2D game libraries for C   and Python"
arch=('i686' 'x86_64')
url="https://bixense.com/jngl/"
license=('zlib')
depends=('sdl2' 'fontconfig' 'glew' 'libwebp' 'openal' 'libvorbis' 'boost')

makedepends=('meson' 'ninja')
source=("https://github.com/jhasse/jngl/archive/v$pkgver.tar.gz")
md5sums=('9dcbcde797ae92b61c7fd0fdaf044e47')

build() {
    cd $srcdir/jngl-$pkgver
    mkdir build
    cd build
    meson .. --prefix=${pkgdir}/usr
}
package() {
    cd jngl-$pkgver/build
    ninja install
}

(btw: I've changed the license to zlib)

@Photon89
Copy link
Author

Right, I officially identify as a blind chicken... :) Thanks, I put the PKGBUILD to the AUR!

@jhasse
Copy link
Owner

jhasse commented Mar 12, 2018

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants