Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error in the latest snapshot. #113

Closed
Zombie-Ryushu opened this issue May 3, 2017 · 34 comments
Closed

Build error in the latest snapshot. #113

Zombie-Ryushu opened this issue May 3, 2017 · 34 comments
Labels

Comments

@Zombie-Ryushu
Copy link

m-throttle/src/wx/panel.cpp
/builddir/build/BUILD/visualboyadvance-m-throttle/src/wx/panel.cpp: In member function 'void GameArea::AdjustMinSize()':
/builddir/build/BUILD/visualboyadvance-m-throttle/src/wx/panel.cpp:716:16: error: 'ceil' is not a member of 'std'
wxSize sz((std::ceil(basic_width * gopts.video_scale) / hidpi_scale_factor),
^
/builddir/build/BUILD/visualboyadvance-m-throttle/src/wx/panel.cpp:716:16: note: suggested alternative:
In file included from /usr/include/features.h:378:0,
from /usr/include/assert.h:35,
from /usr/include/wx-2.8/wx/debug.h:18,
from /usr/include/multiarch-x86_64-linux/wx-2.8/wx/defs.h:521,
from /usr/include/multiarch-dispatch.h:72,
from /usr/include/wx-2.8/wx/defs.h:2,
from /usr/include/wx-2.8/wx/string.h:25,
from /usr/include/wx-2.8/wx/bitmap.h:19,
from /usr/include/wx-2.8/wx/dcmemory.h:15,
from /usr/include/wx-2.8/wx/dcbuffer.h:15,
from /builddir/build/BUILD/visualboyadvance-m-throttle/src/wx/panel.cpp:1:
/usr/include/bits/mathcalls.h:178:1: note: 'ceil'
__MATHCALLX (ceil,, (Mdouble __x), (const));
^
/builddir/build/BUILD/visualboyadvance-m-throttle/src/wx/panel.cpp:717:16: error: 'ceil' is not a member of 'std'
(std::ceil(basic_height * gopts.video_scale) / hidpi_scale_factor));
^
/builddir/build/BUILD/visualboyadvance-m-throttle/src/wx/panel.cpp:717:16: note: suggested alternative:
In file included from /usr/include/features.h:378:0,
from /usr/include/assert.h:35,
from /usr/include/wx-2.8/wx/debug.h:18,
from /usr/include/multiarch-x86_64-linux/wx-2.8/wx/defs.h:521,
from /usr/include/multiarch-dispatch.h:72,
from /usr/include/wx-2.8/wx/defs.h:2,
from /usr/include/wx-2.8/wx/string.h:25,
from /usr/include/wx-2.8/wx/bitmap.h:19,
from /usr/include/wx-2.8/wx/dcmemory.h:15,
from /usr/include/wx-2.8/wx/dcbuffer.h:15,
from /builddir/build/BUILD/visualboyadvance-m-throttle/src/wx/panel.cpp:1:
/usr/include/bits/mathcalls.h:178:1: note: 'ceil'
__MATHCALLX (ceil,, (Mdouble __x), (const));
^
/builddir/build/BUILD/visualboyadvance-m-throttle/src/wx/panel.cpp: In member function 'void GameArea::LowerMinSize()':
/builddir/build/BUILD/visualboyadvance-m-throttle/src/wx/panel.cpp:732:15: error: 'ceil' is not a member of 'std'
wxSize sz(std::ceil(basic_width / hidpi_scale_factor),
^

@ZachBacon
Copy link
Contributor

First of all, what platform, what compiler.

@Zombie-Ryushu
Copy link
Author

gcc, Linux. wxgtk+ 2.8

@ZachBacon
Copy link
Contributor

Ok next question. What distribution.

@ZachBacon
Copy link
Contributor

Sorry what distribution and gcc version.

@Zombie-Ryushu
Copy link
Author

Mageia and Rosa.

@Zombie-Ryushu
Copy link
Author

gcc-4.9.2_2014.08-2

@ZachBacon
Copy link
Contributor

So for the most part the compiler should be fine, and technically wx-2.8 should still compile. Though we've been making the push to wx-3.0. if Mageia has that, try and compile with that

@Zombie-Ryushu
Copy link
Author

I'm getting different build errors with WX 3.0

@ZachBacon
Copy link
Contributor

I'm have a feeling Mageia is doing some weird shit as right now a good 90% of the Linux distros have compiled it with pretty much little issues. I'll have to do up a VM and see what's going on when I get off work at my day job.

@Zombie-Ryushu
Copy link
Author

I have build logs I can show you.

@ZachBacon
Copy link
Contributor

Please do.

@Zombie-Ryushu
Copy link
Author

https://pastebin.com/j3N9R8Z4
https://pastebin.com/74D8FQSF

Here are two build attempits against Rosa 2014.1 and Mageia 5.1

@rkitover
Copy link
Collaborator

rkitover commented May 4, 2017

@Zombie-Ryushu I think I forgot to #include <cmath>, can you try that?

@rkitover rkitover added the bug label May 4, 2017
@Zombie-Ryushu
Copy link
Author

I can get it to build under Rosa 2016, but not Rosa 2014, or Mageia 5.1. (It might Compile under Mageia 6 when released. I don't know yet.)

/builddir/build/BUILD/visualboyadvance-m-throttle/src/wx/opts.cpp: In function 'void load_opts()':
/builddir/build/BUILD/visualboyadvance-m-throttle/src/wx/opts.cpp:349:22: error: cannot convert 'const wxString' to 'const wxChar* {aka const wchar_t*}' in assignment
opts[i].desc = wxGetTranslation(opts[i].desc);
^
/builddir/build/BUILD/visualboyadvance-m-throttle/src/wx/opts.cpp:503:60: error: cannot convert 'const wxString' to 'const wxChar* {aka const wchar_t*}' in initialization
const wxChar* evx = wxGetTranslation(ev);
^
/builddir/build/BUILD/visualboyadvance-m-throttle/src/wx/opts.cpp: In function 'bool opt_set(const wxChar*, const wxChar*)':
/builddir/build/BUILD/visualboyadvance-m-throttle/src/wx/opts.cpp:803:67: error: cannot convert 'const wxString' to 'const wxChar* {aka const wchar_t*}' in initialization
const wxChar* evx = wxGetTranslation(opt->enumvals);
^
/builddir/build/BUILD/visualboyadvance-m-throttle/src/wx/cmdevents.cpp: In member function 'void MainFrame::DoRomInformation()':
/builddir/build/BUILD/visualboyadvance-m-throttle/src/wx/cmdevents.cpp:564:18: error: cannot convert 'const wxString' to 'const wxChar* {aka const wchar_t*}' in assignment
type = _("ROM");

@rkitover
Copy link
Collaborator

rkitover commented May 5, 2017

@Zombie-Ryushu so did adding an #include <cmath> fix the std::ceil error?

The wxChar conversion error I will look at.

What is the purpose of your diffs, you need to quote them properly in markdown for one thing, they are unreadable. To include a diff, the first line should be:

```diff

and the last line should be:

```

See this guide: https://guides.github.com/features/mastering-markdown/

@Zombie-Ryushu
Copy link
Author

The Diffs are fixes that prevent the emulator from hanging or segfaulting on exit.
I did not get the chance to try include cmath because an downstream maintainer made his own changes. I'll repost the diffs.

His comments are as follows:
I guess we cannot backport vbam to rosa2014.1 then...

The only way to solve this issue is to rebuild wxgtk3.0 with disabled STL:

but this change makes wxgtk3.0 binary incompatible with current rosa2014.1
build. It means every package that uses wxgtk3.0 should be rebuilt. So I guess
we'll just skip vbam backport.

I'll mark this bug as resolved because rosa2016.1 package is up to date now.

@Zombie-Ryushu
Copy link
Author

diff -Naur visualboyadvance-m-2.0.0-orig/src/wx/cmdevents.cpp visualboyadvance-m-2.0.0/src/wx/cmdevents.cpp
--- visualboyadvance-m-2.0.0-orig/src/wx/cmdevents.cpp	2016-08-09 17:12:13.000000000 +0300
+++ visualboyadvance-m-2.0.0/src/wx/cmdevents.cpp	2016-11-25 20:09:44.117044963 +0300
@@ -1342,6 +1342,7 @@
 // formerly Exit
 EVT_HANDLER(wxID_EXIT, "Exit")
 {
+    panel->UnloadGame();
     Close(false);
 }

@Zombie-Ryushu
Copy link
Author

diff -urN visualboyadvance-m-VBA-M_Beta_2/CMakeScripts/FindSFML.cmake visualboyadvance-m-VBA-M_Beta_2-patched/CMakeScripts/FindSFML.cmake
--- visualboyadvance-m-VBA-M_Beta_2/CMakeScripts/FindSFML.cmake	2015-09-20 01:58:26.000000000 +1000
+++ visualboyadvance-m-VBA-M_Beta_2-patched/CMakeScripts/FindSFML.cmake	2015-09-30 23:23:05.000000000 +1000
@@ -107,8 +107,8 @@
     else()
         # SFML version is < 2.0
         if (SFML_REQUESTED_VERSION GREATER 10900)
-            set(SFML_VERSION_OK FALSE)
-            set(SFML_VERSION_MAJOR 1)
+            set(SFML_VERSION_OK TRUE)
+            set(SFML_VERSION_MAJOR 2)
             set(SFML_VERSION_MINOR x)
             set(SFML_VERSION_PATCH x)
         endif()

@Zombie-Ryushu
Copy link
Author

Zombie-Ryushu commented May 5, 2017

I still want to try and get this working on Rosa 2014.1 and Mageia 5.1.

I'm going to likely try for an SDL only build next.

If you could post a diff where to insert include that would be good too.

rkitover added a commit that referenced this issue May 5, 2017
A couple files that use the std::ceil() math ceiling function were not
including the required header <cmath> and this seemed to have been
causing build errors on some Linux distributions.

Add the necessary #include <cmath> statement to both files.
@rkitover
Copy link
Collaborator

rkitover commented May 5, 2017

@Zombie-Ryushu what version of SFML do Rosa2014 and Mageia5.1 have?

Who is the author of the diffs so I can credit the commit properly? I need full name and email. Or at least full name.

I added the #include <cmath> statement in fed6f23 in master.

I am fixing the wxgtk3.0 without STL issue now.

@rkitover
Copy link
Collaborator

rkitover commented May 5, 2017

So that wxChar build error is not related to --disable-stl, trying --disable-stl --disable-unicode now.

@Zombie-Ryushu
Copy link
Author

Zombie-Ryushu commented May 6, 2017

I have successfully built vbam (throttle) under Rosa 2014.1, SDL only. It seems to use Super Game Boy Palettes but its not displaying the border. It also segfaults every exit again.

@Zombie-Ryushu
Copy link
Author

Backtrace for vbam Segfault

(gdb) bt full
#0 0x0000003a58e6e7f4 in fclose@@GLIBC_2.2.5 () from /lib64/libc.so.6
No symbol table info available.
#1 0x0000000000627e5b in SaveConfigFile () at /usr/src/debug/visualboyadvance-m-throttle/src/common/ConfigManager.cpp:772
f = 0x0
buf = "~/.vbam\000\000\000\000\000\037\332\000\000\000\000\000 \371R\362 \000\000\000 \000\000\000:\000\000\000\001\000\000\000\000\000\000\000\020", '\000' <repeats 15 times>, " ", '\000' <repeats 15 times>, "\240\364\331\000\000\000\000\000P\377\322\000\000\000\000\000V*\350X:\000\000\000\001\000\000\000\000\000\000\000\265\316z9\000\000\000 \000\000\000\000\000\000\000\030\020\323", '\000' <repeats 17 times>, "\001\000\000\000\340\017\323\000\000\000\000\000\220\377\322\000\000\000\000\000\304\377\322\000\000\000\000\000\000\020", '\000' <repeats 22 times>...
s = {st_dev = 2304, st_ino = 15089669, st_nlink = 2, st_mode = 16877, st_uid = 500, st_gid = 500, __pad0 = 0, st_rdev = 0, st_size = 4096, st_blksize = 4096, st_blocks = 8, st_atim = {tv_sec = 1494038206, tv_nsec = 0},
st_mtim = {tv_sec = 1494038174, tv_nsec = 0}, st_ctim = {tv_sec = 1494038174, tv_nsec = 0}, __glibc_reserved = {0, 0, 0}}
configFile =
#2 0x00000000004224fb in main (argc=, argv=) at /usr/src/debug/visualboyadvance-m-throttle/src/sdl/SDL.cpp:2014

@rkitover
Copy link
Collaborator

rkitover commented May 6, 2017

@Zombie-Ryushu this has been fixed in master like a week or two ago. Please report problems with master only, not any earlier code.

@Zombie-Ryushu
Copy link
Author

Alright. Well, while I have Super Game Boy 2 Support working, it consumes 64% of my CPU time and creates buffer under runs.

@rkitover
Copy link
Collaborator

rkitover commented May 7, 2017

@Zombie-Ryushu can you give me the full name and email of the author of the diffs?

@Zombie-Ryushu
Copy link
Author

Zombie-Ryushu commented May 7, 2017

I can't because I don't know who made it. I was just in my downstream distribution's Packages. It could be any Mageia or Rosa maintainer.

@rkitover
Copy link
Collaborator

rkitover commented May 7, 2017

@Zombie-Ryushu I mostly built with Mageia 5.1, the compile error with wxChar from your log does not appear. I cannot get it to link though because there is no 64 bit libsdl2, is there one available somewhere?

@Zombie-Ryushu
Copy link
Author

@Zombie-Ryushu
Copy link
Author

Try with Rosa 2014.1 next.

@rkitover
Copy link
Collaborator

rkitover commented May 7, 2017

@Zombie-Ryushu installing random RPMs from other dists is all well and good if you just need to get something to work, but how exactly are we supposed to actually support this distribution if there is no 64 bit SDL2 package?

With e.g. Fedora, there are some things available in rpmfusion that aren't in the main repos. So for example we use rpmfusion for ffmpeg on fedora.

@rkitover
Copy link
Collaborator

rkitover commented May 7, 2017

@Zombie-Ryushu so I used a stock mageia:5.1 image from the Docker repos, and I did not get either of the compile errors you reported here, how do you explain that? It seems like I'm just wasting my time.

@Zombie-Ryushu
Copy link
Author

There is 64 bit SDL2 on Mageia. To the best of my Knowledge. At least it installs n my systems, I'll check later today.

@Zombie-Ryushu
Copy link
Author

Zombie-Ryushu commented May 7, 2017

I must be doing something wrong then. I apologize. Half of my systems are Rosa, the other Half are Mageia. I tend to cross compile Mageia in a chroot. I am now only getting build errors on Rosa 2014.1. Not Mageia or Rosa 2016.

@Squall-Leonhart Squall-Leonhart closed this as not planned Won't fix, can't repro, duplicate, stale Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants