Rpcs3: Error compiling rpcs3 on Linux

Created on 31 Mar 2016  路  48Comments  路  Source: RPCS3/rpcs3

I got this when I tried to compile rpcs3

[ 81%] Building CXX object rpcs3/CMakeFiles/rpcs3.dir/Gui/MainFrame.cpp.o
/home/butz/Emus+/rpcs3/rpcs3/Gui/MainFrame.cpp:6:25: fatal error: git-version.h: No existe el fichero o el directorio
#include "git-version.h"
^
compilation terminated.
rpcs3/CMakeFiles/rpcs3.dir/build.make:7526: fallo en las instrucciones para el objetivo 'rpcs3/CMakeFiles/rpcs3.dir/Gui/MainFrame.cpp.o'
make[2]: ** [rpcs3/CMakeFiles/rpcs3.dir/Gui/MainFrame.cpp.o] Error 1
CMakeFiles/Makefile2:719: fallo en las instrucciones para el objetivo 'rpcs3/CMakeFiles/rpcs3.dir/all'
make[1]: *
* [rpcs3/CMakeFiles/rpcs3.dir/all] Error 2
Makefile:127: fallo en las instrucciones para el objetivo 'all'
make: *** [all] Error 2

Which means that the compiler complains about a missing "git-version.h", I don't know what happen, is it me or rpcs3 fault?

Bug Miscellaneous Linux

All 48 comments

Please provide all the necessary information. What commands did you use from the beginning? System setup? Distro? Compiler? CMake? Etc

System: corei7 at 3.7Ghz, 8GB RAM, NVIDIA GTX550ti 2GB VRAM and PSU: EVGA 600+80
Distro: Debian Stretch (Testing) 64bits
Compiler: Gcc 5.3.1
Cmake: 3.5

I did the same as usual, I created a folder named "build", enter to the folder, then I type "cmake .." after that, make and bang, I got that error when it is compiling :P

What commands did you use from the beginning?

git clone https://github.com/RPCS3/rpcs3
cd rpcs3
git submodule update --init
mkdir build
cd build
cmake ..
make

What git version do you have?

git version 2.8.0.rc3

I can confirm the same thing happens on Arch, with GCC 5.3.0, CMake 3.5.1, and Git 2.8.0 (non-rc). Just in case, here's that console output again with English messages:

[ 81%] Building CXX object rpcs3/CMakeFiles/rpcs3.dir/Gui/MainFrame.cpp.o
/home/justin/rpcs3/rpcs3/Gui/MainFrame.cpp:6:25: fatal error: git-version.h: No such file or directory
#include "git-version.h"
^
compilation terminated.
rpcs3/CMakeFiles/rpcs3.dir/build.make:7526: recipe for target 'rpcs3/CMakeFiles/rpcs3.dir/Gui/MainFrame.cpp.o' failed
make[2]: ** [rpcs3/CMakeFiles/rpcs3.dir/Gui/MainFrame.cpp.o] Error 1
CMakeFiles/Makefile2:719: recipe for target 'rpcs3/CMakeFiles/rpcs3.dir/all' failed
make[1]: *
* [rpcs3/CMakeFiles/rpcs3.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
[justin@JustinPC rpcs3]$

I'm no expert by any means, but I did manage to get past this error. I had an earlier build of RPCS3 with the "git-version.h" (located in rpcs3/rpcs3), so I copied that file into my current build, and the compiler recognized the file was there and continued on. It seems as though the "git-version.cmake" isn't properly generating the "git-version.h" file for some reason.

Even after I fixed this error, I was hit with an almost identical error (shown below) further along in the compilation process. Just like with the Git files, I noticed "node.h" is missing from the yaml-cpp directory (or at least, it isn't stored alongside "node.cpp"). Are these files generated by CMake, or should they be included?

[ 91%] Building CXX object rpcs3/CMakeFiles/rpcs3.dir//Utilities/yaml-cpp/src/node.cpp.o
/home/justin/rpcs3/Utilities/yaml-cpp/src/node.cpp:1:32: fatal error: yaml-cpp/node/node.h: No such file or directory
compilation terminated.
rpcs3/CMakeFiles/rpcs3.dir/build.make:8701: recipe for target 'rpcs3/CMakeFiles/rpcs3.dir/
/Utilities/yaml-cpp/src/node.cpp.o' failed
make[2]: ** [rpcs3/CMakeFiles/rpcs3.dir/__/Utilities/yaml-cpp/src/node.cpp.o] Error 1
CMakeFiles/Makefile2:719: recipe for target 'rpcs3/CMakeFiles/rpcs3.dir/all' failed
make[1]: *
* [rpcs3/CMakeFiles/rpcs3.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
[justin@JustinPC rpcs3]$

Yes. Recently the yaml-cpp submodule was added for future use. It's currently not used in the code base, AFAIK.

Try to reinit submodules.

Looks good now, thanks!

@justinehler close this issue if it works now.

@danilaml It's @butzsan's issue.

@butzsan Can you build now?

I am compiling right now, give me a couple of minutes :)

Same issue for me, I dont know why :(

/home/butz/Emus+/rpcs3/rpcs3/Gui/MainFrame.cpp:6:25: fatal error: git-version.h: No existe el fichero o el directorio
#include "git-version.h"
^
compilation terminated.

@butzsan can you run cmake with --debug-output option and post the output here?

@butzsan and make -v

@danilaml GNU Make 4.1

@butzsan sorry, I meant make V=1

@danilaml it gives me the same error at the end :(

Ok, after updating the emu a few minutes ago, I try to compile and pass this error, but now it gave me:

In file included from /home/butz/Emus+/rpcs3/Utilities/yaml-cpp/src/regeximpl.h:10:0,
from /home/butz/Emus+/rpcs3/Utilities/yaml-cpp/src/regex_yaml.h:83,
from /home/butz/Emus+/rpcs3/Utilities/yaml-cpp/src/exp.h:13,
from /home/butz/Emus+/rpcs3/Utilities/yaml-cpp/src/scantoken.cpp:3:
/home/butz/Emus+/rpcs3/Utilities/yaml-cpp/src/stream.h:10:34: fatal error: yaml-cpp/noncopyable.h: No existe el fichero o el directorio
compilation terminated.

Make sure you updated your submodules.

tried to build it today
having the same error from the beggining of the thread
keep in mind that ive downloaded all submodules today

Using arch x64
git 2.8.0(release)
cmake 3.5.1

rpcs3/rpcs3/Gui/MainFrame.cpp:6:25: fatal error: git-version.h: No such file or directory
#include "git-version.h"
^

@butzsan please, I asked for the full output of make V=1 (or make VERBOSE=1) not if it succedes or not (it obviously doesn't).

@butzsan could you add "${RPCS3_SRC_DIR}/../Utilities/yaml-cpp/" here https://github.com/RPCS3/rpcs3/blob/master/rpcs3/CMakeLists.txt#L125 and see if it helps.

@Uramekus can you provide log of make V=1 too?

without "${RPCS3_SRC_DIR}/../Utilities/yaml-cpp/" http://pastebin.com/cvGANmeV
with "${RPCS3_SRC_DIR}/../Utilities/yaml-cpp/" http://pastebin.com/1N16hUrF
also my problem is not with yaml-cpp, building from git using the same commands that @butzsan used still give me errors on "git-version.h"

@Uramekus hm, it seems that for some reason the GitVersion target (that generates git-version.h) doesn't get built on your system.
It's hard to say exactly what's wrong since I'm not CMake guru and don't know hot to reproduce this (it works fine on ci), but could you try and see if adding add_dependencies(rpcs3 GitVersion) somewhere around here https://github.com/RPCS3/rpcs3/blob/master/rpcs3/CMakeLists.txt#L14 helps (you'd have to rerun cmake after that of course)?

redownloading everything right now
Gimme 5 minutes
may we go to rpcs3 Freenode and post the solution later here?

@danilaml same error than before T_T, @Uramekus I use git submodule update --init --recursive and git submodule foreach git pull origin master in order to pass the error:

rpcs3/rpcs3/Gui/MainFrame.cpp:6:25: fatal error: git-version.h: No such file or directory

include "git-version.h"

CMake Error at CMakeLists.txt:15 (add_dependencies):
Cannot add target-level dependencies to non-existent target "rpcs3".
ill try run git submodule foreach git pull origin master as butzsan posted here

@butzsan @Uramekus Feel free to join irc.
This target should be executed https://github.com/RPCS3/rpcs3/blob/master/rpcs3/CMakeLists.txt#L9 but I don't see it in your logs for some reason. Maybe it's cmake 3.5/git 2.8 problem, hard to tell.

its an cmake 3.5(maybe 3.2+) problem
managed to build perfectly using cmake 3.2.2 without any changes
my thanks to zecoxao for helping me on IRC

@Uramekus so let me get this straight: cmake 3.5 - doesn't compile. No manipulations done. cmake 3.2 - works fine? (I'm asking this to be sure that there were no git-version.h generate/created manually before downgrading)

yes, exactly, although now there are some new dependencies to install in your local system that needs to be updated in README.md
these are libboost-dev and yaml-cpp-dev

@Uramekus yaml-cpp is temporary, it's unused at the moment but CMake tries to build it anyway because it's in the wrong folder. It'll get rid of boost dependency with the next release.

It didn't work for me, I downgrade cmake to 3.0.2-1 and the result was the same, error with yaml T_T

@butzsan install yaml-cpp on arch
maybe libyaml too but im 80% sure is just yaml-cpp

@Uramekus I install libyaml-cpp-dev but it didn't work

worked fine to me and to zecoxao, did you remove the old cmake files and started from the begginging? i feel that should be more clean

@butzsan just delete yaml-cpp dir in Utilities.

Yes!!!! Thanks @danilaml this fixed the second error, finally it compiled :D

Seems to be fixed. Closing.

the same on ubuntu 16.04. provide working manual or write something like "we doesn't support linux"

Had the same issue. After executingmake GitVersion it worked. So the target exists, but does not get executed automatically.

Hm, maybe adding add_dependencies(rpcs3 GitVersion) somewhere around here would help.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xiangzhai picture xiangzhai  路  3Comments

AniLeo picture AniLeo  路  3Comments

Luffykun007 picture Luffykun007  路  3Comments

uaqlover picture uaqlover  路  3Comments

altiereslima picture altiereslima  路  3Comments