Compile Errors on OSX


#1

I used Macports to install all of the dependent software right before compiling so it should all be the latest versions. When I ran make, I got:

make  all-recursive
Making all in src
  VALAC    easyrpg_editor_vala.stamp
editor.vala:283.2-283.31: warning: method `Editor.save_project_data' never used
	private void save_project_data () throws Error {
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
editor.vala:314.2-314.28: warning: method `Editor.save_game_data' never used
	private void save_game_data () throws Error {
	^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation succeeded - 2 warning(s)
  CC       abstract_imageset.o
cc1: error: unrecognized command line option "-Wno-unused-but-set-variable"
make[2]: *** [abstract_imageset.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Any ideas as to why? Thanks.


#2

Hi redspark!

Which is the output when running:

gcc --version

I have a virtualized OSX 10.8.2 for further testing at home. Did you use homebrew or macports?


#3

Thanks for responding. I’m using Macports on a non-virtualized OS X 10.8.2. The output is:

i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Thanks.


#4

Your current gcc version is a bit old, however your error could be fixed by removing the line:

-Wno-unused-but-set-variable\

from configure.ac and run ./autogen.sh again.


#5

Would it be better to upgrade the compiler? I think I’m using whatever came with Xcode or Mountain Lion by default.


#6

It will be necessary if you want to compile EasyRPG Player for OSX, but for Editor is OK with gcc 4.2.x. The -Wno-unused-but-set-variable is just a “don’t show this warning” setting only and can be safely removed.


#7

Ok. Thanks. I’ll up date it.


#8

I’m getting a tonne of compiler errors. I don’t know if I did something wrong or not but here they are:

make all-recursive Making all in src CC abstract_imageset.o CC action.o CC database_dialog.o database_dialog.c: In function ‘database_dialog_construct’: database_dialog.c:142: warning: assignment from incompatible pointer type CC editor.o editor.c: In function ‘editor_open_project’: editor.c:902: warning: format not a string literal and no format arguments editor.c: In function ‘editor_load_maptree_data’: editor.c:1910: warning: passing argument 1 of ‘_gtk_tree_row_reference_copy0’ discards qualifiers from pointer target type editor.c: In function ‘editor_save_all_maps_data’: editor.c:2512: warning: format not a string literal and no format arguments editor.c: In function ‘editor_save_changes’: editor.c:2565: warning: format not a string literal and no format arguments editor.c: In function ‘editor_create_project’: editor.c:3040: warning: pointer targets in passing argument 2 of ‘g_file_replace_contents’ differ in signedness editor.c:3079: warning: pointer targets in passing argument 2 of ‘g_file_replace_contents’ differ in signedness editor.c:3122: warning: format not a string literal and no format arguments editor.c: In function ‘editor_on_map_reordered’: editor.c:3180: warning: passing argument 1 of ‘_gtk_tree_row_reference_copy0’ discards qualifiers from pointer target type editor.c: In function ‘editor_on_map_new’: editor.c:3344: warning: passing argument 1 of ‘gtk_tree_row_reference_get_path’ discards qualifiers from pointer target type editor.c:3398: warning: passing argument 1 of ‘_gtk_tree_row_reference_copy0’ discards qualifiers from pointer target type editor.c: In function ‘editor_on_map_properties’: editor.c:3487: warning: passing argument 1 of ‘gtk_tree_row_reference_get_path’ discards qualifiers from pointer target type editor.c: In function ‘editor_on_map_delete’: editor.c:3573: warning: assignment from incompatible pointer type editor.c:3620: warning: passing argument 1 of ‘gtk_tree_row_reference_get_path’ discards qualifiers from pointer target type editor.c: In function ‘main’: editor.c:3971: warning: ‘g_type_init’ is deprecated (declared at /opt/local/include/glib-2.0/gobject/gtype.h:669) editor.c: At top level: editor.c:444: warning: ‘_editor_files_size_’ defined but not used editor.c:1359: warning: ‘editor_save_project_data’ defined but not used editor.c:1454: warning: ‘editor_save_game_data’ defined but not used CC enum.o CC i_paint_tiles.o CC i_select_tiles.o CC main_window.o main_window.c: In function ‘main_window_construct’: main_window.c:1436: warning: ‘gtk_scrolled_window_add_with_viewport’ is deprecated (declared at /opt/local/include/gtk-3.0/gtk/gtkscrolledwindow.h:111) main_window.c: In function ‘_main_window_menu_item_select_cb_gtk_menu_item_select’: main_window.c:2098: warning: passing argument 2 of ‘main_window_menu_item_select_cb’ from incompatible pointer type main_window.c: In function ‘_main_window_menu_item_deselect_cb_gtk_menu_item_deselect’: main_window.c:2103: warning: passing argument 2 of ‘main_window_menu_item_deselect_cb’ from incompatible pointer type CC map_drawingarea.o CC map_edit_action.o CC map_properties_dialog.o map_properties_dialog.c: In function ‘map_properties_dialog_construct’: map_properties_dialog.c:353: warning: assignment from incompatible pointer type map_properties_dialog.c: In function ‘map_properties_dialog_basic_page_construct’: map_properties_dialog.c:544: warning: unused variable ‘_tileset_collection_size_’ CC map_shift_dialog.o map_shift_dialog.c: In function ‘map_shift_dialog_construct’: map_shift_dialog.c:231: warning: assignment from incompatible pointer type CC maptree_menu.o CC maptree_treestore.o CC maptree_treeview.o CC model_map.o CC model_party.o CC model.o CC model_vehicle.o CC project_create_dialog.o project_create_dialog.c: In function ‘project_create_dialog_construct’: project_create_dialog.c:223: warning: assignment from incompatible pointer type CC resources.o CC rm2k_chipset_imageset.o CC rm2k_chipset_lower_imageset.o CC rm2k_chipset_upper_imageset.o CC stack.o CC structs.o CC tile_palette_drawingarea.o CC tiled_drawingarea.o CC tiled_map_drawingarea.o CC utils.o CC view_actor.o CC view_generic_widgets.o view_generic_widgets.c: In function ‘group_frame_add_entries’: view_generic_widgets.c:451: warning: unused variable ‘_title_collection_size_’ view_generic_widgets.c:486: warning: unused variable ‘_entry_collection_size_’ view_generic_widgets.c: In function ‘group_frame_add_spin_buttons’: view_generic_widgets.c:567: warning: unused variable ‘_title_collection_size_’ view_generic_widgets.c:602: warning: unused variable ‘_button_collection_size_’ view_generic_widgets.c: In function ‘group_frame_add_check_buttons’: view_generic_widgets.c:653: warning: unused variable ‘_button_collection_size_’ CC xml_node.o CC xml_parser.o xml_parser.c:133: warning: initialization from incompatible pointer type CC xml_writer.o xml_writer.c: In function ‘xml_writer_write_node’: xml_writer.c:267: warning: assignment from incompatible pointer type CCLD easyrpg-editor ld: unknown option: --export-dynamic collect2: ld returned 1 exit status make[2]: *** [easyrpg-editor] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2


#9

It’s OK, all compiler issues were just warnings. It’s normal for Vala translated to C source code.
Compiling was successful, only one issue with the linker: “unknown option: --export-dynamic”

Edit src/Makefile.am and remove this:

easyrpg_editor_LDFLAGS =
-Wl,–export-dynamic

Then run ./autogen.sh again


#10

Ok. It seems to be running now. A lot of the glyphs are broken images but it seems to be working so far. Thanks.


#11

Yes, the broken glyphs is a known configuration path issue and it happens in Win32 and GNU/Linux too.
I’ll try to improve the settings for OSX building fixes, according with your feedback. Thanks!