Project

General

Profile

Actions

Emulator Issues #5353

closed

make error : "make: *** [all] Error 2" on linux system using nvidia

Added by andreik7 about 12 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

I am having trouble building dolphin-emu.

I expect a successful build - here is a sample of what greets me :

[ 11%] Building CXX object Source/Core/Common/CMakeFiles/common.dir/Src/Crypto/ec.cpp.o
[ 11%] Building CXX object Source/Core/Common/CMakeFiles/common.dir/Src/Crypto/md5.cpp.o
[ 11%] Building CXX object Source/Core/Common/CMakeFiles/common.dir/Src/Crypto/sha1.cpp.o
Linking CXX static library libcommon.a
[ 11%] Built target common
make: *** [all] Error 2

This happens every time after attempting cmake after cloning the repo on my system.

I attempted building the latest git revision at the time : '20120408' on a i686 Linux system running the -ck patched kernel version 3.3.1. I am also using the propietary nvidia Linux drivers. The driver version is 295.33, along with nvidia-utils. The nvidia-cg-toolkit 3.1-1 is installed. g++ 4.7.0 is installed as well, but a recent patch should've fixed any issues from my understanding : http://code.google.com/p/dolphin-emu/source/detail?r=722480cb2e864ea7dd03427e509470ec09ce6f40

Interestingly enough I managed to install this on a x86_64 system running the linux-ck patched kernel and intel hd3000 graphics after the recent revision which fixed a g++ issue, but this system using nvidia cannot build.

Here's the full build log :

http://dl.dropbox.com/u/45721253/os-related/linux/archlinux/dolphin-emu/failed-dolphin-emu-build-log.txt

Thoughts from me :
I do not have libgl installed, because it conflicts with propietary nvidia stuff. Specifically 'nvidia-utils', which is a dependency of the whole driver. In theory though, the nvidia driver with nvidia-utils should provide everything that libgl provides. Any input on this issue would be greally appreciated. I would love getting dolphin-emu to build on this system.

Actions #1

Updated by parlane about 12 years ago

/tmp/yaourt-tmp-aak/aur-dolphin-emu/src/dolphin-emu-3.0-build/Externals/wxWidgets3/include/wx/filefn.h:476:9: error: zero width for bit-field ‘wxAssert_477::BadFileSizeType’

Actions #2

Updated by parlane about 12 years ago

wxCOMPILE_TIME_ASSERT( sizeof(off_t) == sizeof(wxLongLong_t), BadFileSizeType );

Actions #3

Updated by parlane about 12 years ago

The error doesn't even line up with the file...

Actions #4

Updated by parlane about 12 years ago

Ah it does when I load it through browse, god I hate google code file search.

476: wxCOMPILE_TIME_ASSERT( sizeof(off_t) == sizeof(wxLongLong_t),
BadFileSizeType );

Actions #5

Updated by parlane about 12 years ago

Basically wxLongLong_t should be the same size as off_t... I wish you could print the sizes at that point...

Actions #6

Updated by andreik7 about 12 years ago

How would I attempt to go about it? And what would the sizes give us? Or is it to see what is different?

Actions #7

Updated by parlane about 12 years ago

comment the line(s) out, does everything work? haha.

Actions #8

Updated by andreik7 about 12 years ago

Compiling right now, and it appears that I got past the point that it failed at. We'll see if the compilation is a success.

Actions #9

Updated by parlane about 12 years ago

Shows a deeper problem in wx source really :\ Something on your system doesn't match the expected values for longs and pointers

Actions #10

Updated by parlane about 12 years ago

p.s. id be surprised if when it compiles it actually runs without crashing :D

Actions #11

Updated by andreik7 about 12 years ago

You should be - it compiled perfectly & I'm testing a game on it right now. Many thanks. Who would've known commenting out a line or two of code would fix it.

Actions #12

Updated by parlane about 12 years ago

Weird.. it shouldn't work really. O well... haha

We might need you to work out what the appropriate fix is...

Actions #13

Updated by Anonymous about 12 years ago

andreik7 should post the values of sizeof(off_t) and sizeof(wxLongLong_t) from that file.

Actions #14

Updated by andreik7 about 12 years ago

How would I go about finding the values? I've only found variables with not definite value.

Actions #15

Updated by parlane about 12 years ago

in that same file where you commented the line:

at line 519 right after:
#endif // platforms
add:
template struct Wow;
Wow<sizeof(off_t)> wow;

Compile, you should see some error like:
error: aggregate ‘Wow<8> wow’ has incomplete type and cannot be defined
The number inside the <> is what we want to know for off_t

SECOND!

Same thing again
This time instead of off_t we want wxLongLong_t

so replace above with:

template struct Wow;
Wow<sizeof(wxLongLong_t)> wow;

compile again and get us that other number. thanks :)

Actions #16

Updated by andreik7 about 12 years ago

Here it is:

first change,

/tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/filefn.h:476:9: error: zero width for bit-field ‘wxAssert_477::BadFileSizeType’
/tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/filefn.h:517:20: error: aggregate ‘Wow<4> wow’ has incomplete type and cannot be defined

second change,

/tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/filefn.h:476:9: error: zero width for bit-field ‘wxAssert_477::BadFileSizeType’
/tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/filefn.h:517:27: error: aggregate ‘Wow<8> wow’ has incomplete type and cannot be defined

In short, the first vlue is 4 and the second value is 8.

Actions #17

Updated by parlane about 12 years ago

sizeof(off_t)=4
sizeof(wxLongLong_t)=8

Oh dear.

Actions #18

Updated by parlane about 12 years ago

template struct Wow;
Wow<sizeof(long)> wow;

template struct Wow;
Wow<sizeof(char*)> wow;

Can you try those two please?

Actions #19

Updated by andreik7 about 12 years ago

The only difference between the two logs is this:

first change,
/tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/filefn.h:517:19: error: aggregate ‘Wow<4> wow’ has incomplete type and cannot be defined

second change,
/tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/filefn.h:517:20: error: aggregate ‘Wow<4> wow’ has incomplete type and cannot be defined

Actions #20

Updated by parlane about 12 years ago

You did the long and char* seperately right? i.e. two seperate compiles. At no time were Wow<sizeof(long)> wow; and Wow<sizeof(char*)> wow; both in the file?

Actions #21

Updated by andreik7 about 12 years ago

The same thing as previous but more detail:

first,
[ 6%] Building CXX object Externals/wxWidgets3/CMakeFiles/wx.dir/src/aui/auibar.cpp.o
In file included from /tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/utils.h:21:0,
from /tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/cursor.h:66,
from /tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/event.h:22,
from /tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/window.h:19,
from /tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/control.h:23,
from /tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/statline.h:24,
from /tmp/src/dolphin-emu-build/Externals/wxWidgets3/src/aui/auibar.cpp:29:
/tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/filefn.h:476:9: error: zero width for bit-field ‘wxAssert_477::BadFileSizeType’
/tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/filefn.h:517:19: error: aggregate ‘Wow<4> wow’ has incomplete type and cannot be defined
make[2]: *** [Externals/wxWidgets3/CMakeFiles/wx.dir/src/aui/auibar.cpp.o] Error 1
make[1]: *** [Externals/wxWidgets3/CMakeFiles/wx.dir/all] Error 2
make: *** [all] Error 2

second,
[ 6%] Building CXX object Externals/wxWidgets3/CMakeFiles/wx.dir/src/aui/auibar.cpp.o
In file included from /tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/utils.h:21:0,
from /tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/cursor.h:66,
from /tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/event.h:22,
from /tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/window.h:19,
from /tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/control.h:23,
from /tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/statline.h:24,
from /tmp/src/dolphin-emu-build/Externals/wxWidgets3/src/aui/auibar.cpp:29:
/tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/filefn.h:476:9: error: zero width for bit-field ‘wxAssert_477::BadFileSizeType’
/tmp/src/dolphin-emu-build/Externals/wxWidgets3/include/wx/filefn.h:517:20: error: aggregate ‘Wow<4> wow’ has incomplete type and cannot be defined
make[2]: *** [Externals/wxWidgets3/CMakeFiles/wx.dir/src/aui/auibar.cpp.o] Error 1
make[1]: *** [Externals/wxWidgets3/CMakeFiles/wx.dir/all] Error 2
make: *** [all] Error 2

Actions #22

Updated by andreik7 about 12 years ago

So yes I did them seperately

Actions #23

Updated by parlane about 12 years ago

Thank you for testing for us. I really don't have a solution other than the first one I offered which is to disabled the assert... Please let us know if you come across any crashes while using the GUI? That you can reproduce etc.

Actions #24

Updated by andreik7 about 12 years ago

Well to be frank with you guys the only system I've really had trouble building on is this one. I'm running on a Dell Latitude D630 with a nvidia nvs 135m graphics and a Core2Duo T9300 cpu @ 2.50 ghz. Commenting those lines out allowed me to create a package for generic i686 architectures. Using the binaries I created from the altered source I tested them on a buddies i686 with slow emulation speeds but I didn't expect anything more on a netbook.

My system on the other hand I've been able to test a few gc games successfully (I don't have too high of a demand), and Super Smash Bros Melee ran just fine, if not perfect, at 45-60 fps and 80 - 100 % emulation speed depending on the map in Smash Bros.

I had everything crashing when trying to launch the game from the GUI before, but after flushing out my ram (I had like 2.90/2.96 gb used) I was able to run with no problems.

I know this system isn't much but I knew I would only try some GC games, and Super Smash Bros Melee is a fond memory of my childhood. I have a buddy of mine who's going on a long planeride with me (12+ hours), so I wanted to surprise him with the game on this laptop that I primarily use for work related java stuff.

I appreciate all you help. I created a little .diff file that comments those lines out, but I don't think you guys like that fix for everyone else. I asked other people who use this distribution of linux to try building this package on an i686 if they have spare time to see if they run into the same error and to see if the same fix that worked for me would work for them.

I'll post back, and I'll definately check back here more often to see what you guys have going on.

Actions #25

Updated by Anonymous about 12 years ago

The problem is that off_t is not 8bytes at this point in the code. This shouldn't be an issue as we define http://code.google.com/p/dolphin-emu/source/browse/CMakeLists.txt#570 . Not sure why it's only a problem on this system...

Actions #26

Updated by diegoxter1006 about 12 years ago

Actually i have this very problem myself, running an arch box, updated and pulled the latest changes and still this doesnt work...
Guess i'll comment the line out and see if still doesnt compile

Actions #27

Updated by dtittle about 12 years ago

I think my branch will fix this problem, but I need someone to confirm it for me:

repo: https://code.google.com/r/dtittle-dolphin-emu/
branch: updated-wxWidgets

Actions #28

Updated by diegoxter1006 about 12 years ago

checking that out for you

Actions #29

Updated by lasagnaD about 12 years ago

Gave me similar issues.

[ 6%] Building CXX object Externals/wxWidgets3/CMakeFiles/wx.dir/src/aui/dockart.cpp.o
/home/sebastian/dtittle-dolphin-emu/Externals/wxWidgets3/src/aui/dockart.cpp:44:21: error: gtk/gtk.h: No such file or directory
/home/sebastian/dtittle-dolphin-emu/Externals/wxWidgets3/src/aui/dockart.cpp:46:22: error: missing binary operator before token "("
/home/sebastian/dtittle-dolphin-emu/Externals/wxWidgets3/src/aui/dockart.cpp: In member function ‘virtual void wxAuiDefaultDockArt::DrawSash(wxDC&, wxWindow*, int, const wxRect&)’:
/home/sebastian/dtittle-dolphin-emu/Externals/wxWidgets3/src/aui/dockart.cpp:418: error: ‘GTK_WIDGET_DRAWABLE’ was not declared in this scope
/home/sebastian/dtittle-dolphin-emu/Externals/wxWidgets3/src/aui/dockart.cpp:422: error: ‘gtk_widget_get_style’ was not declared in this scope
/home/sebastian/dtittle-dolphin-emu/Externals/wxWidgets3/src/aui/dockart.cpp:425: error: ‘GTK_STATE_NORMAL’ was not declared in this scope
/home/sebastian/dtittle-dolphin-emu/Externals/wxWidgets3/src/aui/dockart.cpp:426: error: ‘GTK_SHADOW_NONE’ was not declared in this scope
/home/sebastian/dtittle-dolphin-emu/Externals/wxWidgets3/src/aui/dockart.cpp:434: error: ‘GTK_ORIENTATION_VERTICAL’ was not declared in this scope
/home/sebastian/dtittle-dolphin-emu/Externals/wxWidgets3/src/aui/dockart.cpp:434: error: ‘GTK_ORIENTATION_HORIZONTAL’ was not declared in this scope
/home/sebastian/dtittle-dolphin-emu/Externals/wxWidgets3/src/aui/dockart.cpp:435: error: ‘gtk_paint_handle’ was not declared in this scope
make[2]: *** [Externals/wxWidgets3/CMakeFiles/wx.dir/src/aui/dockart.cpp.o] Error 1
make[1]: *** [Externals/wxWidgets3/CMakeFiles/wx.dir/all] Error 2
make: *** [all] Error 2

Actions #30

Updated by parlane about 12 years ago

You are missing gtk? o_O

Actions #31

Updated by NeoBrainX about 12 years ago

We should check for that in the wxwidgets CMakeLists.txt, I guess.

Actions #32

Updated by parlane about 12 years ago

libgtk2.0-dev I think?

Actions #33

Updated by lasagnaD about 12 years ago

Fixed it via CLI build command:

mkdir BuildCLI && cd BuildCLI
cmake -Dbindir=../Binary/Linux -Ddatadir=../Binary/Linux -DDISABLE_WX=ON ..

Actions #34

Updated by dtittle about 12 years ago

libgtk-x11-2.0 I think.

Actions #35

Updated by diegoxter1006 about 12 years ago

Well, i ended up testing that branch and it needed a greater version of wxwidgets (arch's version of the package is 2.8.12) and compilation failed again...

Actions #36

Updated by dtittle about 12 years ago

What failed? The branch should download version 2.9.4 or greater...

Do you have build output?

Actions #37

Updated by diegoxter1006 about 12 years ago

My bad, here it is.
It fails building wxwidgets

Actions #38

Updated by dtittle about 12 years ago

It looks like Make wants you to use the -j1 option (for one processor core) while building wxWidgets.

Open the master CMakeLists.txt file, and change line 570 to add -j1 to the make command:
BUILD_COMMAND make -j1 > ${wxWidgets_PREFIX}/wxWidgets-build.out

See if that works.

Actions #39

Updated by diegoxter1006 about 12 years ago

Pretty much the same thing, wxwidgets stops compiling when this happen:
/home/diegoxter/builds/dolphin-emu-dtittle-git/src/dolphin-emu/Externals/wxWidgets/src/wxWidgets/src/unix/joystick.cpp:132:50: aviso: se descarta el valor de devolución de ‘ssize_t read(int, void*, size_t)’, se declaró con el atributo warn_unused_result [-Wunused-result]
File "./gen_iface.py", line 801
print '***** Unknown line type: ', line
^
SyntaxError: invalid syntax
make[3]: *** [/home/diegoxter/builds/dolphin-emu-dtittle-git/src/dolphin-emu/Externals/wxWidgets/src/wxWidgets/include/wx/stc/stc.h] Error 1
make[2]: *** [/home/diegoxter/builds/dolphin-emu-dtittle-git/src/dolphin-emu/Externals/wxWidgets/src/wxWidgets-stamp/wxWidgets-build] Error 2
make[1]: *** [CMakeFiles/wxWidgets.dir/all] Error 2

Attached the error log (shorter version) from this time

Actions #40

Updated by dtittle about 12 years ago

Hmm... Maybe this is a problem building wxWidgets on your system?

Try going to the Externals/wxWidgets/src/wxWidgets/ directory and configure/make:

./configure --disable-shared
make

Actions #41

Updated by diegoxter1006 about 12 years ago

Same error:

cd ./src/stc && ./gen_iface.py
File "./gen_iface.py", line 801
print '***** Unknown line type: ', line
^
SyntaxError: invalid syntax
make: *** [include/wx/stc/stc.h] Error 1

Actions #42

Updated by dtittle about 12 years ago

You must have Python 3 installed. "./gen_iface.py" is formatted for Python 2.

If you set Python 2 as your default, it will fix the problem.

Actions #43

Updated by diegoxter1006 about 12 years ago

Changed the shebang line to python2 and it worked!

Actions #44

Updated by dtittle about 12 years ago

Great! I'm going to merge that branch with my master, then.

Github has "pull request" but I don't know if there is something equivalent in Google Code. Consider this a "pull request" :)

Actions #45

Updated by diegoxter1006 about 12 years ago

You should, finally it compiled!
I installed wxwidgets manually (f*ck compatibility) and it compiled...
I'm gonna try to do this on master branch

Actions #46

Updated by delroth almost 12 years ago

  • Status changed from New to Fixed

Fixed by rc83f87dfc4dc.

Actions

Also available in: Atom PDF