You are not logged in.

#1 2008-12-11 23:51:29

yossarianuk
Member
Registered: 2007-05-02
Posts: 103

amarok compile error - recompile with -fPIC

Hi.

I am having compile issues with amarok 2 (also  have erors with AUR package)


Linking CXX shared module ../../../lib/libamarok_collection-sqlcollection.so                       
/usr/bin/ld: /usr/lib/mysql/libmysqld.a(client.o): relocation R_X86_64_32 against `mysql_server_last_error' can not be used when making a shared object; recompile with -fPIC                         
/usr/lib/mysql/libmysqld.a: could not read symbols: Bad value                                     
collect2: ld returned 1 exit status                                                               
make[2]: *** [lib/libamarok_collection-sqlcollection.so] Error 1                                   
make[1]: *** [src/collection/sqlcollection/CMakeFiles/amarok_collection-sqlcollection.dir/all] Error 2                                                                                               
make: *** [all] Error 2

Do I need to recompile mysql ?

I also get this warning when i do the cmake command:-

-- Configuring done
CMake Warning at /usr/share/apps/cmake/modules/KDE4Macros.cmake:560 (add_library):
  Cannot generate a safe linker search path for target
  amarok_collection-sqlcollection because files in some directories may
  conflict with libraries in implicit directories:

    link library [libmysqlclient.so] in /usr/lib may be hidden by files in:
      /usr/lib/mysql

  Some of these libraries may not be found correctly.
Call Stack (most recent call first):
  src/collection/sqlcollection/CMakeLists.txt:50 (kde4_add_plugin)

Offline

#2 2008-12-12 02:12:36

yossarianuk
Member
Registered: 2007-05-02
Posts: 103

Re: amarok compile error - recompile with -fPIC

manged to sort it.....

used abs - editied the /var/abs/local/mysql/PKGBUILD file and added

  export CFLAGS="-fPIC ${CFLAGS}"
  export CXXFLAGS="-fPIC ${CFLAGS}"

under the  #PIC line

recompiled mysql - installed the new package - was then able to build amarok2 o.k.

Offline

#3 2008-12-12 02:39:28

Slammer64
Member
From: Ozark Mountains of Missouri
Registered: 2007-07-28
Posts: 113

Re: amarok compile error - recompile with -fPIC

Thanks yossarianuk, that's the same problem I had.


Somewhere, just out of sight, the Penguins are gathering!

Offline

#4 2008-12-16 07:28:52

papierschiff
Member
Registered: 2008-07-09
Posts: 66

Re: amarok compile error - recompile with -fPIC

i tried the smae, but i still have the same error...

what was wrong? i copied the mysql-directory from /var/abs/extra/mysql to home and edited the pkgbuild-file with   export CFLAGS="-fPIC ${CFLAGS}" and  export CXXFLAGS="-fPIC ${CFLAGS}" under #PIC
than i done makepkg, and than pacman -U mysql....tar.gz

but as i wrote, i still get the same error.
perhaps somebody has an idea what i did wrong. i am still a newb with rebuilding packages smile

lg
papierschiff

Offline

#5 2008-12-16 20:01:10

JooBlixlarz
Member
Registered: 2008-12-01
Posts: 23

Re: amarok compile error - recompile with -fPIC

I have heard in various places you need -fPIC and -DPIC in CFLAGS and CXXFLAGS, and that --enable-embedded-server, --enable-static, and --enable shared all need to be put in the PKGBUILD. I was just looking into installing Amarok earlier today, so I'll try to recompile mysql with those options and see how it goes.


...with a crowbar.

Offline

#6 2008-12-16 21:25:19

Slammer64
Member
From: Ozark Mountains of Missouri
Registered: 2007-07-28
Posts: 113

Re: amarok compile error - recompile with -fPIC

I used yossarianuk's post and added --enable-shared and --enable-static to the PKGBUILD for mysql, that worked for me.


Somewhere, just out of sight, the Penguins are gathering!

Offline

#7 2008-12-16 23:46:18

JooBlixlarz
Member
Registered: 2008-12-01
Posts: 23

Re: amarok compile error - recompile with -fPIC

huh... -fPIC, -DPIC, --enable-static, --enable-embedded-server, and --enable-shared together in my mysql caused Amarok to fail at compiling again.

Linking CXX shared module ../../../lib/libamarok_collection-sqlcollection.so
/usr/bin/ld: /usr/lib/mysql/libmysqld.a(my_thr_init.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/lib/mysql/libmysqld.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [lib/libamarok_collection-sqlcollection.so] Error 1
make[1]: *** [src/collection/sqlcollection/CMakeFiles/amarok_collection-sqlcollection.dir/all] Error 2
make: *** [all] Error 2
==> ERROR: Build Failed.
    Aborting...
Error: Makepkg was unable to build amarok2 package.

...with a crowbar.

Offline

#8 2008-12-17 02:21:47

Slammer64
Member
From: Ozark Mountains of Missouri
Registered: 2007-07-28
Posts: 113

Re: amarok compile error - recompile with -fPIC

Try using the flags without --enable-embedded-server, I didn't use that option.


Somewhere, just out of sight, the Penguins are gathering!

Offline

#9 2008-12-17 09:24:35

papierschiff
Member
Registered: 2008-07-09
Posts: 66

Re: amarok compile error - recompile with -fPIC

where is my mistake? is it the pkgbuild? or my way how i install the mysql/amarok2-packege.

my pkgbuild:

# $Id: PKGBUILD 14174 2008-10-04 15:06:14Z andyrtr $
# Maintainer: Alexander Baldeck <alexander@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgname=mysql
pkgver=5.0.68
pkgrel=1
pkgdesc="A fast SQL database server"
arch=(i686 x86_64)
backup=(etc/my.cnf etc/conf.d/mysqld)
depends=("mysql-clients>=${pkgver}" 'tcp_wrappers')
makedepends=('libtool')
url=('http://www.mysql.com/')
options=('!libtool')
license=('GPL')
source=(http://mirror.provenscaling.com/mysql/enterprise/source/5.0/mysql-${pkgver}.tar.gz
    mysql-no-clients.patch
    mysqld
    my.cnf
    mysqld.conf.d)

build() {
  # PIC
  export CFLAGS="-fPIC ${CFLAGS}"
  export CXXFLAGS="-fPIC ${CFLAGS}"
  cd ${startdir}/src/${pkgname}-${pkgver}
  patch -Np1 -i ${startdir}/src/mysql-no-clients.patch || return 1
  ./configure --prefix=/usr --libexecdir=/usr/sbin \
    --without-debug --without-docs --without-bench --without-readline \
    --with-innodb --enable-local-infile --with-openssl \
    --with-charset=latin1 --with-collation=latin1_general_ci \
    --with-extra-charsets=complex --enable-thread-safe-client \
    --with-libwrap --with-berkeley-db --enable-shared --enable-static --with-embedded-server

  # fixes
  sed -i -e 's/^.*HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE.*$/#define\ HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE/g' include/config.h || return 1
  sed -i -e 's/size_socket/socklen_t/g' sql/mysqld.cc || return 1

  pushd include || return
  make || return 1
  popd
  pushd libmysql
  make link_sources get_password.lo || return
  popd
  make || return 1
  make DESTDIR=${startdir}/pkg install
  rm -rf ${startdir}/pkg/usr/{mysql-test,sql-bench}
  install -D -m644 ../my.cnf ${startdir}/pkg/etc/my.cnf
  install -D -m755 ../mysqld ${startdir}/pkg/etc/rc.d/mysqld
  install -D -m644 ../mysqld.conf.d ${startdir}/pkg/etc/conf.d/mysqld
  rm -f ${startdir}/pkg/usr/bin/mysql_config
}
md5sums=('b3351d755bd62fd203bae777a77ccfef'
         'e892aac36cbeb57f0e003ec0936afb3b'
         '64d79a5a34043c1de949d734b720c217'
         '0ee035590ffc61d32de994f461fd2bd2'
         '4a9077fc95ec6db1d5420e0cdc74d31c')

btw, why isn't there an official package, and special why there is only an so old  mysql-package? not nice sad

Last edited by papierschiff (2008-12-17 09:27:37)

Offline

#10 2008-12-18 19:52:40

papierschiff
Member
Registered: 2008-07-09
Posts: 66

Re: amarok compile error - recompile with -fPIC

nobody has an idea?

Offline

#11 2008-12-19 18:05:51

papierschiff
Member
Registered: 2008-07-09
Posts: 66

Re: amarok compile error - recompile with -fPIC

still get:

Linking CXX shared module ../../../lib/libamarok_collection-sqlcollection.so
/usr/bin/ld: /opt/mysqle/lib/mysql/libmysqld.a(lib_sql.o): relocation R_X86_64_32 against `__dso_handle' can not be used when making a shared object; recompile with -fPIC
/opt/mysqle/lib/mysql/libmysqld.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [lib/libamarok_collection-sqlcollection.so] Error 1
make[1]: *** [src/collection/sqlcollection/CMakeFiles/amarok_collection-sqlcollection.dir/all] Error 2
make: *** [all] Error 2

i installed mysql, deinstalle mysql and mysql-client, installed both, but amarok won't work... i don't understand it. can somebody perhaps create an package on aur or puplish a working pkgbuild?

Offline

#12 2009-01-06 16:45:00

papierschiff
Member
Registered: 2008-07-09
Posts: 66

Re: amarok compile error - recompile with -fPIC

spam... what did i wrong?

Offline

Board footer

Powered by FluxBB