You are not logged in.

#1 2016-05-17 18:15:05

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Error building glmark2-git or glmark2 [SOLVED]

Anyone able build either of these?  I error out on the configure:

==> Starting build()...
Setting top to                           : /build/glmark2-git/src/glmark2-git 
Setting out to                           : /build/glmark2-git/src/glmark2-git/build 
Checking for 'gcc' (c compiler)          : /usr/bin/gcc 
Checking for 'g++' (c++ compiler)        : /usr/bin/g++ 
Checking for header stdlib.h             : yes 
Checking for header string.h             : yes 
Checking for header unistd.h             : yes 
Checking for header stdint.h             : yes 
Checking for header stdio.h              : yes 
Checking for header jpeglib.h            : yes 
Checking for library m                   : yes 
Checking for library jpeg                : yes 
Checking for function memset             : yes 
Checking for function sqrt               : not found 
The configuration failed
(complete log in /build/glmark2-git/src/glmark2-git/build/config.log)

Last edited by graysky (2016-05-17 22:06:13)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#2 2016-05-17 19:45:16

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Error building glmark2-git or glmark2 [SOLVED]

Same error here. The log file has this message:

../test.cpp:11:16: error: overloaded function with no contextual type information
  p=(void*)(sqrt);
                ^

The code they used for checking for 'sqrt' is this:

#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdint.h>
#include <stdio.h>
#include <jpeglib.h>
#include <math.h>

        int main() {
        void *p;
        p=(void*)(sqrt);
        return 0;
}

Offline

#3 2016-05-17 20:45:59

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: Error building glmark2-git or glmark2 [SOLVED]

I found that as well but am unsure how to patch it to simply not run that check.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#4 2016-05-17 21:26:36

mis
Member
Registered: 2016-03-16
Posts: 234

Re: Error building glmark2-git or glmark2 [SOLVED]

This patch removes the check http://pastebin.com/tqxN6SB3

But now compiling fails because -Werror is set, I'm looking for how to unset it atm.

Offline

#5 2016-05-17 21:32:58

mis
Member
Registered: 2016-03-16
Posts: 234

Re: Error building glmark2-git or glmark2 [SOLVED]

Ok, with the patch and this build function it seems to work.

build() {
    cd "${srcdir}/${pkgname}"
    python2 ./waf configure \
        --prefix=/usr \
        --with-flavors=${GM2_FLAVORS} \
        --no-werror
    python2 ./waf -j4
}

edit: building glmark2-git package just finished successfully smile

Last edited by mis (2016-05-17 21:46:01)

Offline

#6 2016-05-17 22:01:42

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: Error building glmark2-git or glmark2 [SOLVED]

@mis - Thank you for the contribution.  The patch and mod to the build function does indeed allow it to build!

Here is a functional PKGBUILD:

# Maintainer: Ryo Munakata <afpacket@gmail.com>
pkgname=glmark2-git
pkgver=r825.fa71af2
pkgrel=1
pkgdesc="OpenGL (ES) 2.0 benchmark (X11, Wayland, DRM)"
arch=('i686' 'x86_64')
url="https://launchpad.net/glmark2"
license=('GPL3')
depends=('libjpeg-turbo' 'libpng12' 'libx11' 'libxcb' 'libgl' 'wayland')
makedepends=('git' 'python2')
conflicts=('glmark2')
provides=('glmark2')
source=("$pkgname"::'git://github.com/glmark2/glmark2.git'
"https://gist.githubusercontent.com/graysky2/83e474d5891cdcd75d8293a47a10b468/raw/892e731ffa98e5901240fbd4127d62c4153eff28/unfuck.patch")
md5sums=('SKIP'
         'cef375cb34614fbbb26307e06449515d')

# GLMARK2 features
GM2_FLAVORS="x11-gl,x11-glesv2,wayland-gl,wayland-glesv2,drm-gl,drm-glesv2"

pkgver() {
    cd "${srcdir}/${pkgname}"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
	cd "${srcdir}/${pkgname}"
	patch -i "$srcdir/unfuck.patch"
}

build() {
    cd "${srcdir}/${pkgname}"
    python2 ./waf configure \
        --prefix=/usr \
        --with-flavors=${GM2_FLAVORS} \
				--no-werror
    python2 ./waf -j4
}

package() {
    cd "${srcdir}/${pkgname}"
    DESTDIR="${pkgdir}" python2 ./waf install
}

Last edited by graysky (2016-05-17 22:06:00)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#7 2016-05-17 22:29:56

mis
Member
Registered: 2016-03-16
Posts: 234

Re: Error building glmark2-git or glmark2 [SOLVED]

graysky wrote:

@mis - Thank you for the contribution.

My pleasure.

Offline

#8 2016-05-19 00:48:54

devm33
Member
Registered: 2013-03-16
Posts: 2

Re: Error building glmark2-git or glmark2 [SOLVED]

I have just updated the package.
Sorry for being late.

Offline

#9 2016-05-19 00:51:53

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: Error building glmark2-git or glmark2 [SOLVED]

@devm33 - Thank you for maintaining.

@mis - I sent your patch upstream: https://github.com/glmark2/glmark2/pull/19

Last edited by graysky (2016-05-19 08:08:46)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#10 2016-05-19 08:06:28

mis
Member
Registered: 2016-03-16
Posts: 234

Re: Error building glmark2-git or glmark2 [SOLVED]

Oh nice, I just referenced your PR in the related issue.

Offline

Board footer

Powered by FluxBB