Compilation in 64 bit linux
#1
Firstly, I'm not sure if this is this is the correct place, so please point me to the correct one if I posted wrongly. Also, sorry for the newbie dev question below Tongue

I have Archlinux 64 bits with multilibs. So, I'm running 64-bit apps, but I still can run PCSX2 and a lot other 32-bit apps. The "magic" is that 64 libs are placed in /usr/lib, while 32-bit libs are in /usr/lib32.

Having that said, I'd like to compile SVN using CMAKE, but I notice the process dies in "if(CMAKE_SIZEOF_VOID_P MATCHES "8")" or, if I comment it, CMAKE uses "/usr/lib/" (instead of lib32)

Is it possible for me to pass through the above-mentioned IF statement? And how can I point libs to /usr/lib32, in order to use my 32-libs as Arch32?

Thanks a lot
Reply

Sponsored links

#2
I think the easiest way would be, instead of playing with the code, to make a /usr/lib symlink to your /usr/lib32 directory. You will most likely encounter source codes other than PCSX2 which will expect to find your 32-bit libraries in /usr/lib.
Reply
#3
I guess that's not possible... Archlinux packages for lib32 use the directory this way (not a symlink). For example, NVidia CG Toolkit version x86_64 is installed, for example, as /usr/lib/libCg.so, while the lib32 of the same packet (means i686 for Arch64) is installed as /usr/lib32/libCg.so.... same file names in different folders.

The "Arch way" would be to compile, pointing 32bit libs to /usr/lib32.. That's how it was installed and it is working pretty well with the r3881 binary version. Smile
Reply
#4
It seems that a Archlinux contributor already made some progress on it and provided means to install Pcsx2 from SVN in Arch64... really cool.

Just for the record, mostly interesting for Archlinux users, see Yggdrasil message at AUR in pcsx2-svn package
Reply
#5
Actually you can remove the fatal error in cmake. I just add it to avoid simple user trying and falling to compile on 64 bits Tongue2 There is no official support on 64 bits.

Normally it must compile fine, if you have the good set of library. In case there is real issue on cmake tell me so that I can improve it. The /usr/lib and /usr/lib32 are debian-like so it must be fine without change.

Ps: look debian-unstable-upstream/control to find all dependency.
Ps2: If I can improve PCSX2 to improve the packaging process contact me.
Reply
#6
I'm working on a package for archlinux - but it is something for my own (at least for now), I'm not the official packager. It seems to work fine. I'm constantly updating with new svn revisions.
You said that I could contact you. I hope you mean it, because I'm still learning how to package in archlinux and how to compile. lol
So, questions:
1- I notice that there are some 3rd party software inside trunk/.. So are the dependencies (ex: SoundTouch) still necessary?
2- I don't have lib32 soundtouch package for my arch64, but I can run PCSX2 with audio. Wasn't it a dependency? Am I missing something?
3- Do you know if any of these dependencies are required only for "make" (compile) and not need later to run PCSX2 (Ex: gcc-multilib)?

Thanks in advance
Reply
#7
You know, at the beginning my goal was only to compile properly PCSX2 on my system. Now I'm a dev Smile

1/ Technically, you do not need any on linux. On your release we use soundtouch in trunk because it is more recent 1.5 instead of 1.3 in ubuntu.
2/ !!! I'm surprised. Try to run ldd libspu2x.so | grep -i sound
Note: the default cmake build is statically link against soundtouch in 3rd party. You can use the following flags to control it -DFORCE_INTERNAL_SOUNDTOUCH
3/ not 100% sure but I would say
cmake Wink
gcc-multilib
libjpeg-dev
libsparsehash-dev
Reply
#8
Well, you know, I originally just wanted to try out pcsx2-playground. Then I had to get it working on 64-bit linux, and submitted patches. And there weren't dialog boxes for the new options in linux, so I wrote them, and submited a patch. And I kept submitting patches every time Linux broke, which was a lot early on. Eventually I ended up as a dev. ^_^

As far as third parties, most of them can be built internally, but are normally linking against external libraries. It is not actually set up to compile wxgtk, so that's always necessary. My bet on the lack of soundtouch is that it's being compiled internally. It often is, because we need a particular version, and the version distributions have (like Ubuntu) can be problematic.

I seem to recall libjpeg being needed even without compiling. Some of the dependencies are actually particular to certain plugins, but still are needed because we don't have alternative plugins that don't use them, other then the null plugins. (nvidia-cg-toolkit is an example; it's needed for zzogl or zerogs. Some works been done to replace it with GLSL, but that's still rather experimental.)

Oh, and recent versions don't need liba52, if that's on your list...

(Funny thing is that I actually built pcsx2 on archlinux on my laptop from the pcsx2-svn in AUR the other night. The results were about as I expected for that computer; too slow to be usable at all. I was trying it to see if I could do a bit of testing on a non-nvidia graphics card...)
Reply
#9
I created a lib32 package of soundtouch 1.5.0, installed it, added it as a dependency and recompiled-and-installed PCSX2 and got nothing different:
Code:
$ ldd /opt/pcsx2/plugins/libspu2x.so | grep -i sound
    libasound.so.2 => /usr/lib32/libasound.so.2 (0xf73e5000)
I guess it is not a dependency..?

liba52 not a dependency anymore? Removed!

Man, I'm learning a lot since I entered in PCSX2 forum. Compilation, cmake, archlinux packaging (mainly lib32, which is more difficult to create for now). It's highly motivating. lol Smile
Reply
#10
Soundtouch is link internally (statically). Use -DFORCE_INTERNAL_SOUNDTOUCH=FALSE in cmake cmd.

Example:
cmake CMakeLists.txt \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_STRIP=FALSE \
-DFORCE_INTERNAL_SOUNDTOUCH=FALSE \
-DUSER_CMAKE_C_FLAGSWackoTRING="-g -O2 -D_FORTIFY_SOURCE=2" \
-DUSER_CMAKE_CXX_FLAGSWackoTRING="-g -O2 -D_FORTIFY_SOURCE=2" \
-DUSER_CMAKE_LD_FLAGSWackoTRING="-Wl,--no-add-needed " \
-DCMAKE_C_COMPILER="/usr/bin/gcc-4.4" \
-DCMAKE_CXX_COMPILER="/usr/bin/g++-4.4"



For your information the current build parameter are
### Select the build type
# Use Release/Devel/Debug : -DCMAKE_BUILD_TYPE=Release|Devel|Debug
# Enable/disable the stipping : -DCMAKE_BUILD_STRIP=TRUE|FALSE
### Force the choice of 3rd party library in pcsx2 over system libraries
# Use all internal lib: -DFORCE_INTERNAL_ALL=TRUE
# Use soundtouch internal lib: -DFORCE_INTERNAL_SOUNDTOUCH=TRUE
# Use zlib internal lib: -DFORCE_INTERNAL_ZLIB=TRUE
### Add some flags to the build process
# control C flags : -DUSER_CMAKE_C_FLAGS="cflags"
# control C++ flags : -DUSER_CMAKE_CXX_FLAGS="cxxflags"
# control link flags : -DUSER_CMAKE_LD_FLAGS="ldflags"

A new one appear in zzogl-dev branch
# Use GLSL API(else NVIDIA_CG): -DGLSL_API=TRUE

And I will probably need to add a new one for po (translation) files.
Reply




Users browsing this thread: 1 Guest(s)