compliation error on slackware 13.37 x86_64 multilib

Nov 14, 2012 at 11:03 PM

Team,

I apologize for the newbie post, but I am having an issue compiling this project on my system. I am an experienced slackware/linux user, using the semi-latest release 13.37 _64, multilib system. (My system can use both 32bit and 64bit binaries http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:multilib)

I am using the slackbuild provided by M.Dislage : http://slackbuilds.org/repository/13.37/games/pcsxr/

I am not using the prebuilt binary package. When I build the package from source (i.e. via running the provided slackbuild script, which does build the package from source), I recieve the following error:

gcc -DHAVE_CONFIG_H -I. -I../include -DLOCALE_DIR=\"/usr/share/locale/\" -I../include    -O2 -fPIC -MT ix86_cpudetect.o -MD -MP -MF .deps/ix86_cpudetect.Tpo -c -o ix86_cpudetect.o `test -f '../libpcsxcore/ix86_64/ix86_cpudetect.c' || echo './'`../libpcsxcore/ix86_64/ix86_cpudetect.c
../libpcsxcore/ix86_64/ix86_cpudetect.c: In function 'GetCPUTick':
../libpcsxcore/ix86_64/ix86_cpudetect.c:140:2: warning: left shift count >= width of type
../libpcsxcore/ix86_64/ix86_cpudetect.c: In function 'cpudetectInit':
../libpcsxcore/ix86_64/ix86_cpudetect.c:121:4: error: can't find a register in class 'BREG' while reloading 'asm'
../libpcsxcore/ix86_64/ix86_cpudetect.c:121:4: error: can't find a register in class 'BREG' while reloading 'asm'
../libpcsxcore/ix86_64/ix86_cpudetect.c:121:4: error: can't find a register in class 'BREG' while reloading 'asm'
../libpcsxcore/ix86_64/ix86_cpudetect.c:121:4: error: can't find a register in class 'BREG' while reloading 'asm'
../libpcsxcore/ix86_64/ix86_cpudetect.c:121:4: error: 'asm' operand has impossible constraints
../libpcsxcore/ix86_64/ix86_cpudetect.c:121:4: error: 'asm' operand has impossible constraints
../libpcsxcore/ix86_64/ix86_cpudetect.c:121:4: error: 'asm' operand has impossible constraints
../libpcsxcore/ix86_64/ix86_cpudetect.c:121:4: error: 'asm' operand has impossible constraints
make[1]: *** [ix86_cpudetect.o] Error 1
make[1]: Leaving directory `/tmp/SBo/pcsxr-1.9.92/libpcsxcore'
make: *** [all-recursive] Error 1

 

I receive the same error when I attempt to build the project from source, via the source download hosted on the site (without the slackbuild). Note: the slackbuild is basically a script which builds the package from source, while setting the appropriate environment variables for a slackware system. The only relevant compliation flags which are set are the following for x86_64 arch: CFLAG="-02 -fPIC".

I will try to run the prebuilt binary and see if I have any success. I'll report my findings soon.

Any help with this issue is greatly appreicated. I prefer building my projects from source, and am eager to see how this project runs on my system!

darkstar_slug

Nov 16, 2012 at 8:40 AM

Okay guys, so after several failed attempts at trying to build this project, I finally figured out how to build from source without running into the weird cpudetect.c:121:4 errors!

I basically created another script which sets the following environment variables, and proceeds to build pcsxr from the source directory:

SLKCFLAGS="-O2 -fPIC"
ARCH=x86_64
LIBDIRSUFFIX=64

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib$LIBDIRSUFFIX \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --build=$ARCH-slackware-linux

make
make install

( cd $CWD/usr/man
  find . -type f -exec gzip -9 {} \;
  for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)

The last part isn't entirely neccessary, it basically goes through each of the man pages in /usr/man, determines they are compressed in gz, and doesn't do anything to them. So for anyone who needs to use this, you can safely remove the last 4 lines. I would be interested to know if any other slackers encounter any issues building M.Dislanges pcxsr slackbuild.

In all honesty, i've rarely encountered issues building slackbuilds from source. This is the first one that sticks out in my mind. Perhaps there is something worth investigating here.

Darkstar_Slug

SLKCFLAGS="-O2 -fPIC"
ARCH=x86_64
LIBDIRSUFFIX=64

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib$LIBDIRSUFFIX \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --build=$ARCH-slackware-linux

make
make install

( cd $CWD/usr/man
  find . -type f -exec gzip -9 {} \;
  for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
SLKCFLAGS="-O2 -fPIC"
ARCH=x86_64
LIBDIRSUFFIX=64

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib$LIBDIRSUFFIX \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --build=$ARCH-slackware-linux

make
make install 

( cd $CWD/usr/man
  find . -type f -exec gzip -9 {} \;
  for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
Nov 16, 2012 at 9:18 AM

Actually, I just realized during the compilation I ran into errors building the dfxvideo plugin. The exact errors I receive during compilation are:

/usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/X11R6/lib/libnsl.a when searching for -lnsl
/usr/lib/libglade-2.0.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[1]: *** [cfgDFXVideo] Error 1
make[1]: Leaving directory `/home/slug/PSX/pcsxr-1.9.92/plugins/dfxvideo'
make: *** [install-recursive] Error 1

This happens whether or not I enable / disable open-gl.

Does anyone have any suggestions? Should I upgrade libglade or something? Or do I need to redownload the headers? I'm going to have to think on this one for a minute.

For now, the gui and everything built for pcsxr. However, its not much use without a video plugin...

Coordinator
Nov 18, 2012 at 5:40 PM

Use the latest version from the repository, it has no libglade dependencies.