..:: PCSX2 Forums ::..
Register | Help | Log In |
Register PCSX2 Site Forums Member List Donate View Today's Posts Search

Current time: 03-15-2010, 02:03 PM Hello There, Guest! (Login — Register)

..:: PCSX2 Forums ::.. / PCSX2 Discussion and Support / Developer Discussion / Linux - Compile Guide and Support

1 user browsing this thread: (0 members, and 1 guest).

Pages (3): 1 2 3 Next »
Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Linux - Compile Guide and Support
Author Message
Air Offline
PCSX2 Programmer
******

Posts: 1.141
Joined: Nov 2008
Location: Meshoppen, PA
Post: #1
Linux - Compile Guide and Support
Differences from 0.9.6 to 0.9.7:
Note that 0.9.6 and the old SVNs based on it use Autotools ./configure scripts to compile. This has been removed in 0.9.7 and replaced with Code::Blocks workspace projects, and we are working on getting cmake-based scripts implemented also. (help in creating and maintaining the cmake scripts would be greatly appreciated!)

For 64-bit Linux Users:
Note: The 64 bit build was dropped, so currently, the most practical way to compile and run pcsx2 on a 64 bit Linux system is in a 32 bit chroot. The way you do this varies depending on distribution, but if you search, you should be able to find documentation on the subject.
--Arcum42



PCSX2 0.9.7 (trunk) - Linux Guide for Compiling

1) (FIXME: Need an updated list of dependencies)

2) Obtain pcsx2:
Code:
svn checkout http://pcsx2.googlecode.com/svn/trunk/ pcsx2-read-only

3) Using Code::Blocks, load the pcsx2 codeblocks workspace in the root folder of the svn checkout, and rebuild all. Ignore errors in SPU2-X, it's a work in progress,

(FIXME: Need a cmake-based build system; none exists yet.)


PCSX2 0.9.6 and prior - Linux Guide for Compiling
(12-14-2008 01:24 PM)Zeydlitz Wrote:  O'k. I do сompilation on newly installed debian/Lenny, so I could made small guide.

1) Packages, need to be installed:
subversion
libbz-dev
libglew1.5-dev
libxxf86vm-dev
nvidia-cg-toolkit
libasound2-dev
joystick
libsdl1.2-dev
libgtk2.0-dev
autoconf
automake

All other packages was already here, so probably you got them all to.

2) Obtain pcsx2
svn checkout http://pcsx2.googlecode.com/svn/branches/legacy-gui/ pcsx2-read-only

3) And run sh build.sh all.

If you want to rebuild all, there is several issues:
1) some slight changes, you could use build.sh install
2) To rebuild only playground bilary, run build.sh in pcsx2 directory
3) If somebody change files in pcsx2/Linux directory, than you should made dist-clean before compilation.
(12-14-2008 01:56 PM)arcum42 Wrote:  As an addition to the Linux compilation guide posted, in the build.sh file, you will see a line that reads something along the line of:
export PCSX2OPTIONS="--enable-sse3 --prefix `pwd`"

This is where the options get passed when compiling. If you want to tweak your build a bit, this is where to do it. Here are the main options.

--enable-sse3 - tells pcsx2 that you have sse3, and to use code that takes advantage of it.
--enable-sse4 - same for sse4. Not very well tested.
--enable-debug - builds just that, a debugging build with no optimization, and all the symbols in the code to make it easy to debug. You would mainly use this if you wanted, for example, to know exactly where a game was crashing.
--enable-devbuild - Similar to the last option, this turns on various logging for pcsx2, to give you a lot more info about what pcsx2 is doing.
--disable-recbuild - Turns off the recompiler, which is where a lot of pcsx2's speed comes from. You almost never want to do this.
--disable-nls - Gets rid of locale support. Doubt you'll ever need to touch this.

Options that are currently in SVN, but not in the official build.
--enable-local-inis - I may have mentioned this one before, though I forgot that it was only in svn. This is actually from a patch from the Gentoo people, to change where the ini files were located, for people that don't want all the pcsx2 files in one folder. If you define LOCAL_PLUGIN_INIS in Linux/Linux.h in the official release, you'd get the same effect.

--enable-customcflags - Also for the Gentoo folk. It just simply makes sure that it uses any system-wide CFLAGS you have set up, in addition to the ones it needs. I may just put this permanently on at some point.

Other notable flags:
--prefix `pwd` - This tells it that the bin folder to install in is in the current directory. Otherwise, it goes straight to /usr/bin, IIRC.
--enable-vmbuild - This actually was broken badly, and I found no evidence that it had ever worked on Linux. So it's been removed for the moment.

Oh, and while current svn still doesn't have the plugins, there is now a bin folder in there you can use.


Note from PCSX2 Team:

Please note that the PCSX2 team only offers partial support for Linux compilation, due to the variety of Linux distros and the customization of each. So we depend a lot of users helping each other out here. Wink If you have problems, post here on this thread and (hopefully) someone will be able to help you.
(This post was last modified: 10-27-2009 04:48 PM by Air. Edit Reason: N/A)
10-27-2009 04:47 PM
Find all posts by this user Quote this message in a reply
Air Offline
PCSX2 Programmer
******

Posts: 1.141
Joined: Nov 2008
Location: Meshoppen, PA
Post: #2
RE: Linux - Compile Guide and Support
(10-27-2009 01:37 PM)Montblanc Wrote:  Thanks for your reply. Well, I always do a full clean before rebuilding, by the way I'm getting the same error messages after trying to link pcsx2 executable.

P.S.: I'm using gcc 4.3.3.

I added a new file, EventSource.cpp in /common/src/Utilities/ -- It should be in the codeblocks project but I think you're using your own custom build system. So check on that.

Jake Stine (Air) - Programmer - Pcsx2 Development Team
10-27-2009 05:04 PM
Find all posts by this user Quote this message in a reply
Montblanc Offline
PCSX2 lover

Posts: 23
Joined: Oct 2009
Location: Aversa, IT
Post: #3
RE: Linux - Compile Guide and Support
(10-27-2009 05:04 PM)Air Wrote:  I added a new file, EventSource.cpp in /common/src/Utilities/ -- It should be in the codeblocks project but I think you're using your own custom build system. So check on that.

I can see the file you're talking about, but it's not listed in Code::Blocks. Can you kindly tell me how to include it?
10-27-2009 07:57 PM
Find all posts by this user Quote this message in a reply
Air Offline
PCSX2 Programmer
******

Posts: 1.141
Joined: Nov 2008
Location: Meshoppen, PA
Post: #4
RE: Linux - Compile Guide and Support
It's on SVN so I'm not sure how comes it's not in your local copy. Here's the diff: http://code.google.com/p/pcsx2/source/di...lities.cbp

Jake Stine (Air) - Programmer - Pcsx2 Development Team
10-27-2009 08:52 PM
Find all posts by this user Quote this message in a reply
Zeydlitz Online
Plugin Author
*****

Posts: 961
Joined: Dec 2008
Location:
Post: #5
RE: Linux - Compile Guide and Support
You forget about wxWidgets, that should be 2.8.8 or 2.8.9
10-27-2009 10:30 PM
Find all posts by this user Quote this message in a reply
Montblanc Offline
PCSX2 lover

Posts: 23
Joined: Oct 2009
Location: Aversa, IT
Post: #6
RE: Linux - Compile Guide and Support
(10-27-2009 08:52 PM)Air Wrote:  It's on SVN so I'm not sure how comes it's not in your local copy. Here's the diff: http://code.google.com/p/pcsx2/source/di...lities.cbp

That file is indeed in my local copy, I just thought Code::Blocks wasn't taking care of that. I should have made myself clearer!

(10-27-2009 10:30 PM)Zeydlitz Wrote:  You forget about wxWidgets, that should be 2.8.8 or 2.8.9

As it's a matter of missing headers, in my case, maybe downgrading wxWidgets from 2.8.10 to 2.8.9 would do the trick.

Thanks for the tips, guys! I'll try building it tomorrow and post here the results.
Have a good night!
10-28-2009 01:50 AM
Find all posts by this user Quote this message in a reply
princep Offline
Curious PCSX2 user

Posts: 6
Joined: Jan 2009
Location: India
Post: #7
RE: Linux - Compile Guide and Support
Just curious to go Offtopic but has any body got their hands on PS2 emulator on PS3 software.
Please ReplySmile

Proud to be a Rajput Chauhan
10-28-2009 11:39 AM
Find all posts by this user Quote this message in a reply
Montblanc Offline
PCSX2 lover

Posts: 23
Joined: Oct 2009
Location: Aversa, IT
Post: #8
RE: Linux - Compile Guide and Support
Good evening, everyone.
I tried downgrading wxWidgets to 2.8.9 and I built it with this options:
Code:
./configure --prefix=/usr --with-gtk --enable-unicode --disable-compat26 --enable-optimise --enable-std_string --enable-stb_iostreams --enable-debug
Summarizing, I can't remove the Ubuntu wx-Widgets package (which gets installed in /usr/local) so I just set the new prefix to /usr, as you can see in configure options. I always do a full workspace clean, then make sure other building options and linker settings point to /usr/bin/wx-config --blah=blah (otherwise, Code::Blocks tries to build pcsx2 against the Ubuntu package with NO unicode support), then I build bin2cpp, cd to pcsx2 svn dir, bash rebuild.sh and rebuild the whole workspace, but I still got the same error messages. I don't know where I might be doing something wrong, I even tried downgrading one more time to 2.8.8, but at no avail.
I'm not going to give up, I just can't stand the fact that I don't know what's causing this... Before I go, let me introduce my best friend once again:
Code:
Linking executable: ../..//bin/pcsx2
./.objs/release/gui/AppInit.o:(.rodata._ZTV11EventSourceIiE[vtable for EventSource<int>]+0x1c): undefined reference to `EventSource<int>::Add(EventListener<int> const&)'
./.objs/release/gui/AppInit.o:(.rodata._ZTV11EventSourceIiE[vtable for EventSource<int>]+0x20): undefined reference to `EventSource<int>::RemoveObject(void const*)'
./.objs/release/gui/AppInit.o:(.rodata._ZTV11EventSourceI14wxCommandEventE[vtable for EventSource<wxCommandEvent>]+0x1c): undefined reference to `EventSource<wxCommandEvent>::Add(EventListener<wxCommandEvent> const&)'
./.objs/release/gui/AppInit.o:(.rodata._ZTV11EventSourceI14wxCommandEventE[vtable for EventSource<wxCommandEvent>]+0x20): undefined reference to `EventSource<wxCommandEvent>::RemoveObject(void const*)'
collect2: ld returned 1 exit status
Process terminated with status 1 (6 minutes, 29 seconds)
4 errors, 37 warnings
(This post was last modified: 10-29-2009 01:06 AM by Montblanc. Edit Reason: )
10-29-2009 12:52 AM
Find all posts by this user Quote this message in a reply
Air Offline
PCSX2 Programmer
******

Posts: 1.141
Joined: Nov 2008
Location: Meshoppen, PA
Post: #9
RE: Linux - Compile Guide and Support
Well EventSource.cpp errors have nothing to do with wx. I have no idea why it's not being compiled or linked, but it's not and that's what you need to focus on.

Jake Stine (Air) - Programmer - Pcsx2 Development Team
10-29-2009 01:04 AM
Find all posts by this user Quote this message in a reply
Montblanc Offline
PCSX2 lover

Posts: 23
Joined: Oct 2009
Location: Aversa, IT
Post: #10
RE: Linux - Compile Guide and Support
(10-29-2009 01:04 AM)Air Wrote:  Well EventSource.cpp errors have nothing to do with wx. I have no idea why it's not being compiled or linked, but it's not and that's what you need to focus on.

If this is not reproducible and it's just affecting my environment, the only thing that comes to my mind is that the cleaning process doesn't exactly do what I want it to do. I'll try a new svn checkout and do everything again from scratch. Thank you as always, Air, you're all very kind guys! Smile

EDIT: I did it! I had some screwed up files in various folders, so after doing everything from scratch I managed to build it! I just had to remove SPU2-X, SPU2Null (undefined references) and ZeroGS (missing PS2Edefs.h) projects from the workspace to get through it all. I just had to change the plugin directory to the latest precompiled beta one as a temporary workaround. I'm finally te(/a)sting by myself where the next release features will lead the next-level PS2 emulation! I'll keep following PCSX2 development from svn. Thanks for your precious help! You're really amazing coders! Wink
(This post was last modified: 10-29-2009 03:07 AM by Montblanc. Edit Reason: N/A)
10-29-2009 01:13 AM
Find all posts by this user Quote this message in a reply
« Next Oldest | Next Newest »
Pages (3): 1 2 3 Next »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:


Current time: 03-15-2010, 02:03 PM

Contact Us | PCSX2 | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication

Powered By MyBB, © 2002-2010 MyBB Group.
Theme created by IncadudeF and modified by bositman