scp-fs2open / wxLauncher

wxLauncher
Other
26 stars 12 forks source link

wxLauncher compile error #108

Closed IssMneur closed 10 years ago

IssMneur commented 10 years ago

From hunter.l...@gmail.com on November 24, 2013 04:34:35

What steps will reproduce the problem? 1. Using OpenSUSE 13.1 x64, with prerequisite program and packages.

  1. run CMake with command: cmake -DUSE_OPENAL=1 -DCMAKE_INSTALL_PREFIX=/usr/local ../
  2. run make command What is the expected output? What do you see instead? expect to successfully compile wxLauncher. got compile error as followed: [ 4%] Building CXX object CMakeFiles/wxlauncher.dir/code/tabs/BasicSettingsPage.cpp.o /home/hunter/Games/wxlauncher-0.9.4/code/tabs/BasicSettingsPage.cpp: In static member function ‘static void BasicSettingsPage::FillResolutionDropBox(wxChoice, long int, long int)’: /home/hunter/Games/wxlauncher-0.9.4/code/tabs/BasicSettingsPage.cpp:1629:26: error: ‘const void’ is not a pointer-to-object type resChoice->Append((it)->GetResString(), it); ^ make[2]: * [CMakeFiles/wxlauncher.dir/code/tabs/BasicSettingsPage.cpp.o] Error 1 make[1]: * [CMakeFiles/wxlauncher.dir/all] Error 2 make: * [all] Error 2

What version of the wxLauncher are you using: 0.9.4, same as in 0.9.1 What version of fs2_open: What mods (and version, if known): What operating system and version: OpenSUSE 13.1 x64 Please provide any additional information below. Here is command output from CMake and make:

hunter@suse:~/Games/wxlauncher-0.9.4> mkdir build hunter@suse:~/Games/wxlauncher-0.9.4> cd build hunter@suse:~/Games/wxlauncher-0.9.4/build> cmake -DUSE_OPENAL=1 -DCMAKE_INSTALL_PREFIX=/usr/local ../ -- The CXX compiler identification is GNU 4.8.1 -- The C compiler identification is GNU 4.8.1 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Found wxWidgets: TRUE (Required is at least version "2.8.10") -- Found PythonInterp: /usr/bin/python (found version "2.7.5") -- Found OpenAL: /usr/lib64/libopenal.so
-- Looking for include file pthread.h -- Looking for include file pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthreadcreate in pthread - found -- Found Threads: TRUE
-- Found SDL: /usr/lib64/libSDLmain.a;/usr/lib64/libSDL.so;-lpthread (found version "1.2.15") -- Configuring done -- Generating done -- Build files have been written to: /home/hunter/Games/wxlauncher-0.9.4/build hunter@suse:~/Games/wxlauncher-0.9.4/build> make Scanning dependencies of target helpmaker NOTICE:Building... NOTICE: Processing input files: NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/index.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/lchanges.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/kauthors.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/jfaq.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/50TechnicalStuff/index.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/50TechnicalStuff/03privacy.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/50TechnicalStuff/02Terminology.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/10Introduction/index.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/10Introduction/02Profiles.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/index.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/20MODs/index.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/20MODs/01modlist.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/10Welcome/index.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/10Welcome/02profiles.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/10Welcome/03news.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/40AdvancedSettings/index.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/40AdvancedSettings/021lighting.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/40AdvancedSettings/01flaglist.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/40AdvancedSettings/10customflags.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/40AdvancedSettings/05flagsets.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/40AdvancedSettings/15commandline.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/30BasicSettings/06network.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/30BasicSettings/index.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/30BasicSettings/03audio.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/30BasicSettings/05joystick.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/30BasicSettings/04speech.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/30BasicSettings/02video.help NOTICE: /home/hunter/Games/wxlauncher-0.9.4/onlinehelp/30Reference/30BasicSettings/01executable.help NOTICE:Writing to /home/hunter/Games/wxlauncher-0.9.4/build/generated/helplinks.cpp NOTICE:....Done. [ 0%] Built target helpmaker Scanning dependencies of target version.cpp.maker Checking if build is needed... /home/hunter/Games/wxlauncher-0.9.4/build/version.cpp.maker.temp does not exist Generating... Writing to tempfile /home/hunter/Games/wxlauncher-0.9.4/build/version.cpp.maker.temp. Directory already exists... 中止: 這邊沒有 Mercurial 儲存庫(找不到 .hg) 中止: no repository found in '/home/hunter/Games/wxlauncher-0.9.4' (.hg not found)! Done. [ 0%] Built target version.cpp.maker Scanning dependencies of target wxlauncher [ 2%] Building CXX object CMakeFiles/wxlauncher.dir/code/tabs/AdvSettingsPage.cpp.o [ 4%] Building CXX object CMakeFiles/wxlauncher.dir/code/tabs/BasicSettingsPage.cpp.o /home/hunter/Games/wxlauncher-0.9.4/code/tabs/BasicSettingsPage.cpp: In static member function ‘static void BasicSettingsPage::FillResolutionDropBox(wxChoice
, long int, long int)’: /home/hunter/Games/wxlauncher-0.9.4/code/tabs/BasicSettingsPage.cpp:1629:26: error: ‘const void_’ is not a pointer-to-object type resChoice->Append((it)->GetResString(), it); ^ make[2]: * [CMakeFiles/wxlauncher.dir/code/tabs/BasicSettingsPage.cpp.o] Error 1 make[1]: * [CMakeFiles/wxlauncher.dir/all] Error 2 make: * [all] Error 2 hunter@suse:~/Games/wxlauncher-0.9.4/build>

Original issue: http://code.google.com/p/wxlauncher/issues/detail?id=108

IssMneur commented 10 years ago

From jg18....@gmail.com on November 29, 2013 01:12:53

Thanks for the detailed report.

Please check out the wxLauncher source code using Mercurial < https://code.google.com/p/wxlauncher/source/checkout > and apply the attached patch file using "hg patch --no-commit", then let us know whether it compiles. If it works, we'll commit it to trunk.

Status: Accepted
Owner: jg18....@gmail.com
Labels: OpSys-Linux Severity-Critical

Attachment: fix_gcc_481_compile_error.patch

IssMneur commented 10 years ago

From hunter.l...@gmail.com on December 06, 2013 07:42:18

Thank you for the path, and sorry to reply this late.

I did try the path, but not working. Compiler throws same error message, but the program code is somewhat different. I don't know if this make a difference, I am actually running OpenSUSE 13.1 in VMware Player on Windows 7 Pro. Could it be, I am missing some library or packages which i didn't install? Or could it be, I am using Traditional Chinese character set?

Attachment is complete console output, start from download repository.

Attachment: opensuse_build_fail_console_output.txt

IssMneur commented 10 years ago

From jg18....@gmail.com on December 07, 2013 02:01:27

Thanks for the detailed output.

Using Traditional Chinese characters is unrelated to this issue, but make sure that you're using the Unicode builds of wxWidgets from the OpenSUSE repository.

I did a little more research. Looks like GCC 4.8.1 is being picky here, even though the code here is fine. The easiest thing to do is add the -fpermissive GCC flag, as the output suggests.

Go to your wxLauncher build directory and clear it out completely (rm -rf *) then try running CMake this way:

cmake -DUSE_OPENAL=1 -DCMAKE_CXX_FLAGS=-fpermissive -DCMAKE_INSTALL_PREFIX=/usr/local ../

Then let us know if that works. You may get some compiler warnings instead of errors.

You can check whether the -fpermissive flag was applied by opening CMakeCache.txt in the build folder after you've run CMake and checking the value of CMAKE_CXX_FLAGS.

IssMneur commented 10 years ago

From hunter.l...@gmail.com on December 07, 2013 22:17:27

Thank you for Replying.

I did check with wxWidgets library, it is version 2.8.x with unicode support.

I try using "-fpermissive" flag. Error on "../wxlauncher/code/tabs/BasicSettingsPage.cpp:1629:22" did changed to warning. but several new error raised. please see attachment. I also attach CMakeCache.txt for your reference.

Thanks.

Attachment: opensuse_build_fail_console_output.txt CMakeCache.txt

IssMneur commented 10 years ago

From jg18....@gmail.com on December 08, 2013 12:53:34

Bizarre. Can you build wxWidgets 2.8.12 from source? It's the wx version that the official OS X and Windows builds use, so it has a better chance of working. http://wxwidgets.org/downloads/#previous_stable Choose wxGTK. When you use ./configure, enable Unicode and SDL, and maybe create static libraries (.a files) so that you don't have to do "make install" and conflict with OpenSUSE's version, up to you (--disable-shared).

Then clear out your wxLauncher build folder again and when you run CMake, add these two options to your command line, all on one line:

-DwxWidgets_CONFIG_EXECUTABLE=//wx-config -DwxWidgets_wxrc_EXECUTABLE=/utils/wxrc/wxrc

where is the path to your wxWidgets build directory.

IssMneur commented 10 years ago

From jg18....@gmail.com on December 08, 2013 12:56:19

Also note that should be the absolute path to your build folder starting from "/".

IssMneur commented 10 years ago

From hunter.l...@gmail.com on December 08, 2013 18:13:31

Thanks, I'll try it when i have time.

Would it because OpenSUSE default use KDE Window Environment, thus installed wx library is different?

I remember back in OpenSUSE 11.x it compile just fine. but i cannot remember which desktop environment I used. I'll try to install GNOME Desktop and compile under it, see if it make any difference.

IssMneur commented 10 years ago

From jg18....@gmail.com on December 08, 2013 22:29:56

I think there is a wx library for Qt, but the main wx Linux port is for GTK. You shouldn't need to install all of GNOME, just the GTK libraries and header files, but I'm not totally sure exactly which repo packages you need.

But if you're running Linux in a Windows 7 VM, why not just use wxLauncher in Windows and get the official Windows build from the wxLauncher downloads page? https://code.google.com/p/wxlauncher/downloads/list

IssMneur commented 10 years ago

From hunter.l...@gmail.com on December 09, 2013 00:52:09

Thank for advice, I'll look through wx library for GTK.

I already have FSO running on my Windows 7. just want to try it out on Linux box.

IssMneur commented 10 years ago

From jg18....@gmail.com on December 09, 2013 01:09:33

Well, in that case, a couple extra cautions:

(1) Last I checked, FSO doesn't run all that well in a VM.

(2) I'm not sure how well VMWare supports OpenGL in Linux. You'll need to check.

IssMneur commented 10 years ago

From evgom....@gmail.com on December 12, 2013 13:31:34

Im running openSUSE 13.1 64 bits (Host, not virtualized), and i have the same errors. I apply the patch and still broken. I have installed gtk2-devel and gtk3-devel.

Any suggestion?

IssMneur commented 10 years ago

From evgom....@gmail.com on December 12, 2013 17:25:05

This are related, i change the version of wxwidgets, and i can compile it the launcher: https://code.google.com/p/wxlauncher/issues/detail?id=72

IssMneur commented 10 years ago

From hunter.l...@gmail.com on December 12, 2013 18:12:22

so far, I try to add libgtk2u library packages still no luck under KDE. I haven't got around to try on GNOME. I guess OpenSUSE changed too much, so KDE and GNOME can NOT co-exist. hopefully, I'll have time to try to compile on GNOME.

IssMneur commented 10 years ago

From hunter.l...@gmail.com on December 12, 2013 19:14:48

correction, I mean libwx-gtk2u wxcontainer library packages.

IssMneur commented 10 years ago

From jg18....@gmail.com on December 12, 2013 23:38:23

Ah right, I forgot about issue 72 . The recommendation in comment #1 in that issue (installing the wxwidgets-wxcontainer-devel package instead of the wxwidgets-devel package) will likely fix things. Try doing that.

Labels: -Severity-Critical Severity-Low

IssMneur commented 10 years ago

From hunter.l...@gmail.com on December 13, 2013 21:39:00

thank you all.

it compiled after install "wxwidgets-wxcontainer-devel" package under KDE, even with out patch and using "-fpermissive" flag.

but when run, it give this error: /usr/local/bin/wxlauncher: relocation error: /usr/local/bin/wxlauncher: symbol _ZTI10wxNodeBase, version WXU_2.8 not defined in file libwx_baseu-2.8.so.0 with link time reference

attach complete console output.

any idea? Thanks

I'll try to run in GNOME later.

Attachment: opensuse_kde_console_output.txt

IssMneur commented 10 years ago

From jg18....@gmail.com on December 14, 2013 01:48:19

Based on the comments in this Ubuntu bug https://bugs.launchpad.net/ubuntu/+source/poedit/+bug/610686 , it sounds like wxLauncher is being compiled and then tried to run using different versions of wxWidgets.

Since I don't have OpenSUSE, I'm not sure of the details, but I'd say try clearing out your wxLauncher build folder completely and run CMake/make/make install again, but first make sure that you have uninstalled the STL version of wxWidgets (wxwidgets-devel I think?) and check that all of your wxWidgets packages are of the same version of wxWidgets.

IssMneur commented 10 years ago

From hunter.l...@gmail.com on December 14, 2013 21:05:29

Thanks.

Clarify me, if I got this correctly. I only needs libwx-gtk2u wxcontainer library packages for wxLauncher, but not libwx-gtk2u stl library packages?

I didn't know if I need the STL packages, so I installed both.

IssMneur commented 10 years ago

From hunter.l...@gmail.com on December 14, 2013 22:58:18

finally, I got it to run I guess it was simply the wxWidget library problem. Thank you all.

IssMneur commented 10 years ago

From jg18....@gmail.com on December 15, 2013 11:34:09

Glad to hear it. I'll close this as a duplicate of Issue 72 , since it's really the same underlying issue.

Status: Duplicate