You are not logged in.

#1 2008-11-11 11:53:10

Bloged
Member
From: Bergschenhoek, Netherlands
Registered: 2008-11-11
Posts: 18

Need static libGLU (libGLU.a)

Hello everyone,

I'm new to Arch Linux, have two years experience using Ubuntu, so I'm still learning about the little Arch-things. Therefore my post in the newbie section, please move it to a more appriopriate subforum if needed.

For a programming excercise I need the static libGLU library. I can find locate the .so files but it seems I'm in need of the .a file.

$ locate libGLU
/usr/lib/libGLU.so
/usr/lib/libGLU.so.1
/usr/lib/libGLU.so.1.3.070003

It's probably a package I'm missing, but which one? Is there a way to search inside packages?

Thanks in advance for any help,

Arjan Gelderblom


I think computer viruses should count as life. Maybe it says something about human nature, that the only form of life we have created so far is purely destructive. Talk about creating life in our own image.
-- Stephen Hawking

Offline

#2 2008-11-11 12:35:40

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: Need static libGLU (libGLU.a)

we usally build library packages with --disable-static. check what pkg owns the shared lib with 'pacman -Qo /usr/lib/libGLU.so' then 'abs' the package and rebuild it with --enable-static.

Last edited by AndyRTR (2008-11-11 12:41:45)

Offline

#3 2008-11-11 12:48:52

Bloged
Member
From: Bergschenhoek, Netherlands
Registered: 2008-11-11
Posts: 18

Re: Need static libGLU (libGLU.a)

AndyRTR wrote:

we usally build library packages with --diable-static. check what pkg owns the shared lib with 'pacman -Qo /usr/lib/libGLU.so' then 'abs' the package and rebuild it with --enable-static.

I've found out to which package it belongs to.

$ pacman -Qo /usr/lib/libGLU.so
/usr/lib/libGLU.so is owned by mesa 7.0.3-3

I've found out how to build something the ABS way. But where do I give the parameter --enable-static?

makepkg -s --enable-static

doesn't work!

Thanks in advance,

Arjan Gelderblom


I think computer viruses should count as life. Maybe it says something about human nature, that the only form of life we have created so far is purely destructive. Talk about creating life in our own image.
-- Stephen Hawking

Offline

#4 2008-11-11 13:57:28

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: Need static libGLU (libGLU.a)

You edit the mesa PKGBUILD.. a PKGBUILD is just a shell script being read by another shell script called makepkg.


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#5 2008-11-11 14:22:18

Bloged
Member
From: Bergschenhoek, Netherlands
Registered: 2008-11-11
Posts: 18

Re: Need static libGLU (libGLU.a)

I've already taken a look inside the PKGBUILD file, but couldn't find what I was looking for:/ Could somebody point it out:rolleyes:

I've added the PKGBUILD script. Thanks in advance,

Arjan Gelderblom

PKGBUILD

# $Id: PKGBUILD 3486 2008-06-22 21:12:34Z jgc $
# Maintainer: Alexander Baldeck <alexander@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=mesa
pkgver=7.0.3
pkgrel=3
pkgdesc="Mesa OpenGL library"
arch=(i686 x86_64)
license=('LGPL')
url="http://mesa3d.sourceforge.net"
depends=('libgl' 'glproto>=1.4.9' 'gcc-libs' 'libxt')
makedepends=('imake' 'pkgconfig')
conflicts=('mesa-apps')
replaces=('mesa-apps')
source=(http://downloads.sourceforge.net/sourceforge/mesa3d/MesaLib-${pkgver}.tar.bz2
        http://downloads.sourceforge.net/sourceforge/mesa3d/MesaDemos-${pkgver}.tar.bz2
    ftp://ftp.archlinux.org/other/mesa/gl-manpages-1.0.1.tar.bz2
    mesa-6.5-apps-noglut.patch)
md5sums=('e6e6379d7793af40a6bc3ce1bace572e'
         '47fd6863621d3c9c7dbb870ab7f0c303'
         '6ae05158e678f4594343f32c2ca50515'
         'cc5a4ea4ea8de4425997fcda2a9d8648')

build() {
  cd ${startdir}/src/Mesa-${pkgver}
  patch -Np0 -i ${startdir}/src/mesa-6.5-apps-noglut.patch || return 1

  unset CFLAGS
  unset CXXFLAGS

  CONFIG="linux-dri-x86"
  if [ "${CARCH}" = "x86_64" ]; then
    CONFIG="linux-dri-x86-64"
    sed -i -e "s/lib64/lib/g" configs/${CONFIG}
  fi
  echo "EXTRA_LIB_PATH =" >> configs/${CONFIG}
  echo "SRC_DIRS = glx/x11 glu glw" >> configs/${CONFIG}
  rm -f include/GL/glut*h
  echo "USING_EGL = 0" >> configs/${CONFIG}
  echo "PROGRAM_DIRS =" >> configs/${CONFIG}
  echo "MKDEP = makedepend" >> configs/${CONFIG}
  echo "DRI_DIRS =" >> configs/${CONFIG}
  echo "DRI_DRIVER_SEARCH_DIR = /usr/lib/xorg/modules/dri" >> configs/${CONFIG}
  echo "ARCH_FLAGS += -DGLX_USE_TLS" >> configs/${CONFIG}
  echo "X11_INCLUDES = `pkg-config --cflags-only-I x11`" >> configs/${CONFIG}

  make ${CONFIG} || return 1
  install -m755 -d ${startdir}/pkg/usr
  make INSTALL_DIR=${startdir}/pkg/usr install || return 1
  install -m644 include/GL/*.h ${startdir}/pkg/usr/include/GL/ || return 1

  rm -f ${startdir}/pkg/usr/lib/libGL.so*
  cd progs/xdemos
  make CFLAGS+="-I${startdir}/pkg/usr/include" glxinfo glxgears || return 1
  install -m755 -d ${startdir}/pkg/usr/bin || return 1
  install -m755 glxinfo glxgears ${startdir}/pkg/usr/bin/ || return 1

  cd ${startdir}/src/gl-manpages-1.0.1
  ./configure --prefix=/usr || return 1
  make || return 1
  make DESTDIR=${startdir}/pkg install || return 1
}

I think computer viruses should count as life. Maybe it says something about human nature, that the only form of life we have created so far is purely destructive. Talk about creating life in our own image.
-- Stephen Hawking

Offline

#6 2008-11-13 10:11:52

Bloged
Member
From: Bergschenhoek, Netherlands
Registered: 2008-11-11
Posts: 18

Re: Need static libGLU (libGLU.a)

*Bump* roll

No one here got an idea?

Grtz,
Arjan Gelderblom


I think computer viruses should count as life. Maybe it says something about human nature, that the only form of life we have created so far is purely destructive. Talk about creating life in our own image.
-- Stephen Hawking

Offline

#7 2008-11-13 18:26:21

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: Need static libGLU (libGLU.a)

see if changing configure to:
./configure --enable-static --prefix=/usr || return 1 works..


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#8 2008-11-13 18:41:49

Bloged
Member
From: Bergschenhoek, Netherlands
Registered: 2008-11-11
Posts: 18

Re: Need static libGLU (libGLU.a)

test1000 wrote:

see if changing configure to:
./configure --enable-static --prefix=/usr || return 1 works..

That doesn't work either (already tried) wink

I got further with changing:

  CONFIG="linux-dri-x86"
  if [ "${CARCH}" = "x86_64" ]; then
    CONFIG="linux-dri-x86-64"
    sed -i -e "s/lib64/lib/g" configs/${CONFIG}
  fi

to:

  CONFIG="linux-x86-static"
  if [ "${CARCH}" = "x86_64" ]; then
    CONFIG="linux-x86-64-static"
    sed -i -e "s/lib64/lib/g" configs/${CONFIG}
  fi

That will build a libGLU.a in the temporary pkg/usr/lib/ directory. But somewhere after that it crashes with:

$ makepkg -s

==> Making package: mesa 7.0.3-3 i686 (Thu Nov 13 19:35:07 CET 2008)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
  -> Downloading MesaLib-7.0.3.tar.bz2...
--2008-11-13 19:35:07--  http://downloads.sourceforge.net/sourceforge/mesa3d/MesaLib-7.0.3.tar.bz2
Resolving downloads.sourceforge.net... 216.34.181.60
Connecting to downloads.sourceforge.net|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://dfn.dl.sourceforge.net/sourceforge/mesa3d/MesaLib-7.0.3.tar.bz2 [following]
--2008-11-13 19:35:08--  http://dfn.dl.sourceforge.net/sourceforge/mesa3d/MesaLib-7.0.3.tar.bz2
Resolving dfn.dl.sourceforge.net... 194.95.236.6
Connecting to dfn.dl.sourceforge.net|194.95.236.6|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3389327 (3.2M) [application/x-bzip2]
Saving to: `MesaLib-7.0.3.tar.bz2.part'

  3300K .........                                             100%  361K=16s

2008-11-13 19:35:24 (209 KB/s) - `MesaLib-7.0.3.tar.bz2.part' saved [3389327/3389327]

  -> Downloading MesaDemos-7.0.3.tar.bz2...
--2008-11-13 19:35:24--  http://downloads.sourceforge.net/sourceforge/mesa3d/MesaDemos-7.0.3.tar.bz2
Resolving downloads.sourceforge.net... 216.34.181.60
Connecting to downloads.sourceforge.net|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://mesh.dl.sourceforge.net/sourceforge/mesa3d/MesaDemos-7.0.3.tar.bz2 [following]
--2008-11-13 19:35:25--  http://mesh.dl.sourceforge.net/sourceforge/mesa3d/MesaDemos-7.0.3.tar.bz2
Resolving mesh.dl.sourceforge.net... 213.203.218.122
Connecting to mesh.dl.sourceforge.net|213.203.218.122|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1342158 (1.3M) [application/x-bzip2]
Saving to: `MesaDemos-7.0.3.tar.bz2.part'

  1300K ..........                                            100%  348K=4.5s

2008-11-13 19:35:30 (290 KB/s) - `MesaDemos-7.0.3.tar.bz2.part' saved [1342158/1342158]

  -> Downloading gl-manpages-1.0.1.tar.bz2...
--2008-11-13 19:35:30--  ftp://ftp.archlinux.org/other/mesa/gl-manpages-1.0.1.tar.bz2
           => `gl-manpages-1.0.1.tar.bz2.part'
Resolving ftp.archlinux.org... 209.85.41.145, 209.85.41.144
Connecting to ftp.archlinux.org|209.85.41.145|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /other/mesa ... done.
==> SIZE gl-manpages-1.0.1.tar.bz2 ... 201387
==> PASV ... done.    ==> RETR gl-manpages-1.0.1.tar.bz2 ... done.
Length: 201387 (197K)

     0K .......... .......... .......... .......... .......... 25% 84.3K 2s

2008-11-13 19:35:34 (145 KB/s) - `gl-manpages-1.0.1.tar.bz2.part' saved [201387]

  -> Found mesa-6.5-apps-noglut.patch in build dir
==> Validating source files with md5sums...
    MesaLib-7.0.3.tar.bz2 ... Passed
    MesaDemos-7.0.3.tar.bz2 ... Passed
    gl-manpages-1.0.1.tar.bz2 ... Passed
    mesa-6.5-apps-noglut.patch ... Passed
==> Extracting Sources...
  -> bsdtar -x -f MesaLib-7.0.3.tar.bz2
  -> bsdtar -x -f MesaDemos-7.0.3.tar.bz2
  -> bsdtar -x -f gl-manpages-1.0.1.tar.bz2
==> Entering fakeroot environment...
==> Starting build()...
patching file progs/xdemos/Makefile
Hunk #1 succeeded at 59 with fuzz 2 (offset 10 lines).
(cd configs && rm -f current && ln -s linux-x86-static current)
make default
make[1]: Entering directory `/home/rarjang/abs-build/mesa/src/Mesa-7.0.3'
make[2]: Entering directory `/home/rarjang/abs-build/mesa/src/Mesa-7.0.3/src'
Making sources for linux-x86-static
mkdir ../lib
make[3]: Entering directory `/home/rarjang/abs-build/mesa/src/Mesa-7.0.3/src/glx/x11'
Makefile:91: depend: No such file or directory
touch depend
makedepend -fdepend -I. -I../../../include -I../../../include/GL/internal -I../../../src/mesa/main -I../../../src/mesa/glapi   glcontextmodes.c clientattrib.c compsize.c eval.c glxcmds.c glxext.c glxextensions.c indirect.c indirect_init.c indirect_size.c indirect_window_pos.c indirect_transpose_matrix.c indirect_vertex_array.c indirect_vertex_program.c pixel.c pixelstore.c render2.c renderpix.c single2.c singlepix.c vertarr.c xfont.c glx_pbuffer.c glx_query.c glx_texture_compression.c dri_glx.c XF86dri.c \
        ../../../src/mesa/main/dispatch.c ../../../src/mesa/glapi/glapi.c ../../../src/mesa/glapi/glthread.c ../../../src/mesa/x86/glapi_x86.S 
makedepend: warning:  glcontextmodes.c (reading /usr/include/sys/types.h, line 147): cannot find include file "stddef.h"
    not in ./stddef.h
    not in ../../../include/stddef.h
    not in ../../../include/GL/internal/stddef.h
    not in ../../../src/mesa/main/stddef.h
    not in ../../../src/mesa/glapi/stddef.h
    not in /usr/include/stddef.h

<<cut>>

/home/rarjang/abs-build/mesa/src/Mesa-7.0.3/src/glx/x11/clientattrib.c:136: undefined reference to `XFree'
/home/rarjang/abs-build/mesa/src/Mesa-7.0.3/src/glx/x11/clientattrib.c:136: undefined reference to `XFree'
/home/rarjang/abs-build/mesa/src/Mesa-7.0.3/src/glx/x11/clientattrib.c:136: undefined reference to `XFree'
/home/rarjang/abs-build/mesa/src/Mesa-7.0.3/src/glx/x11/clientattrib.c:136: undefined reference to `XFree'
/home/rarjang/abs-build/mesa/src/Mesa-7.0.3/src/glx/x11/clientattrib.c:136: undefined reference to `XFree'
../../lib/libGL.a(clientattrib.o):/home/rarjang/abs-build/mesa/src/Mesa-7.0.3/src/glx/x11/clientattrib.c:136: more undefined references to `XFree' follow
../../lib/libGL.a(indirect.o): In function `__glXSetupVendorRequest':
indirect.c:(.text+0xcb1d): undefined reference to `_XFlush'
../../lib/libGL.a(indirect.o): In function `__glXSetupSingleRequest':
indirect.c:(.text+0xcd0d): undefined reference to `_XFlush'
../../lib/libGL.a(indirect.o): In function `__glXReadReply':
indirect.c:(.text+0xcff4): undefined reference to `_XReply'
indirect.c:(.text+0xd02d): undefined reference to `_XRead'
indirect.c:(.text+0xd03e): undefined reference to `_XEatData'
../../lib/libGL.a(indirect.o): In function `__glXReadPixelReply':
indirect.c:(.text+0xfb84): undefined reference to `_XReply'
indirect.c:(.text+0xfc0a): undefined reference to `_XRead'
indirect.c:(.text+0xfc6b): undefined reference to `_XEatData'
collect2: ld returned 1 exit status
make: *** [glxinfo] Error 1
==> ERROR: Build Failed.
    Aborting...

While building the original package of ABS also fails somewhere building the glxgears binary!

Thanks for any help further along!

Arjan Gelderblom


I think computer viruses should count as life. Maybe it says something about human nature, that the only form of life we have created so far is purely destructive. Talk about creating life in our own image.
-- Stephen Hawking

Offline

#9 2008-11-13 18:50:05

Bloged
Member
From: Bergschenhoek, Netherlands
Registered: 2008-11-11
Posts: 18

Re: Need static libGLU (libGLU.a)

makedepend: warning:  glcontextmodes.c (reading /usr/include/sys/types.h, line 147): cannot find include file "stddef.h"
    not in ./stddef.h
    not in ../../../include/stddef.h
    not in ../../../include/GL/internal/stddef.h
    not in ../../../src/mesa/main/stddef.h
    not in ../../../src/mesa/glapi/stddef.h
    not in /usr/include/stddef.h

Problem above is solved by installing freeglut:

$ pacman -S freeglut

Last edited by Bloged (2008-11-13 18:50:30)


I think computer viruses should count as life. Maybe it says something about human nature, that the only form of life we have created so far is purely destructive. Talk about creating life in our own image.
-- Stephen Hawking

Offline

Board footer

Powered by FluxBB