You are not logged in.

#1 2014-02-16 17:01:43

krysto
Member
Registered: 2014-02-16
Posts: 6

[SOLVED] Help with Cmake and shared libraries

Hi all, I am trying to compile source code for the PCSX2 emulator, as I am hoping to contribute to the project. However, when I try to build, cmake gives me this error:

-- Could NOT find Threads (missing:  Threads_FOUND)
-- Could NOT find wxWidgets (missing:  wxWidgets_FOUND)

I have tried installing wxgtk2.8 and also the 32 bit version, but cmake does not seem to recognize it.

Last edited by krysto (2014-02-16 19:42:27)

Offline

#2 2014-02-16 17:08:19

Neburski
Member
Registered: 2009-09-15
Posts: 118

Re: [SOLVED] Help with Cmake and shared libraries

Did you just download the source code and try to compile or are you using the PKGBUILD from the AUR?
At least the PKGBUILD from the AUR should give you an idea what needs to be done to get it to compile.

Offline

#3 2014-02-16 17:09:38

krysto
Member
Registered: 2014-02-16
Posts: 6

Re: [SOLVED] Help with Cmake and shared libraries

No, I just downloaded the source code from github. I will look at the pkgbuild though, thanks for the hint.

Offline

#4 2014-02-16 17:11:39

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Help with Cmake and shared libraries

How exactly are you compiling PCSX2? Are you using ABS?

Offline

#5 2014-02-16 17:12:30

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Help with Cmake and shared libraries

Neburski wrote:

Did you just download the source code and try to compile or are you using the PKGBUILD from the AUR?
At least the PKGBUILD from the AUR should give you an idea what needs to be done to get it to compile.

PCSX2 is in the repos too: https://projects.archlinux.org/svntogit … ages/pcsx2

Offline

#6 2014-02-16 17:13:04

krysto
Member
Registered: 2014-02-16
Posts: 6

Re: [SOLVED] Help with Cmake and shared libraries

The team wrote a build script, build.sh. You can run that, which then runs cmake, which then in turn runs GNU make.

Offline

#7 2014-02-16 17:15:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Help with Cmake and shared libraries

In Arch Linux we use pacman, our package manager to install packages and their dependencies and makepkg to build the packages using PKGBUILDs.

Offline

#8 2014-02-16 17:26:33

krysto
Member
Registered: 2014-02-16
Posts: 6

Re: [SOLVED] Help with Cmake and shared libraries

Yes, I have used pacman before to install software, but what if I want to contribute to the development of a project? Does pacman place the source code somewhere on my machine?

Offline

#9 2014-02-16 17:37:49

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Help with Cmake and shared libraries

pacman installs packages, makepkg deals with source code. Read the wiki article about ABS.

Offline

#10 2014-02-16 18:59:57

Neburski
Member
Registered: 2009-09-15
Posts: 118

Re: [SOLVED] Help with Cmake and shared libraries

krysto wrote:

Yes, I have used pacman before to install software, but what if I want to contribute to the development of a project?

Usually when you are developing software you don't install the package every time you compile it. You just make sure that you can run it from the location where you compiled it. That way you can keep the latest stable version that you can use for leisure time and the development version for testing. Also for contributing to a project you should directly interact with the project's repository (svn, git, ...). So I refer back to my first post here where the PKGBUILD can give you an idea how to go about compiling the source code yourself.

Just don't run "make install" because that will leave your system in a messy state, a simple "make" (with the proper configuration) should result in a locally build binary that you can run from where it was compiled.

Offline

#11 2014-02-16 19:28:16

krysto
Member
Registered: 2014-02-16
Posts: 6

Re: [SOLVED] Help with Cmake and shared libraries

So a good rule of thumb would be to use pacman to manage any shared libraries and packages that I don't need to touch, and keep all working source code and binaries seperate, like in /home/user/workspace?

Last edited by krysto (2014-02-16 19:28:29)

Offline

#12 2014-02-16 19:29:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Help with Cmake and shared libraries

You can write a PKGBUILD for the code you're developing too.

Offline

#13 2014-02-16 19:40:09

krysto
Member
Registered: 2014-02-16
Posts: 6

Re: [SOLVED] Help with Cmake and shared libraries

After looking at the pkgbuild, I learned that you need to add flags to the build.sh script to tell cmake where to find wxwidgets:

-DwxWidgets_CONFIG_EXECUTABLE='/usr/bin/wx-config-2.8'
-DwxWidgets_wxrc_EXECUTABLE='/usr/bin/wxrc-2.8'

So... problem solved! I was able to compile and run the emulator in my git folder.

Last edited by krysto (2014-02-16 19:41:15)

Offline

Board footer

Powered by FluxBB