Re: issues with using TARGET compilation argument

  • From: Liviu Andronic <landronimirc@xxxxxxxxx>
  • To: emelfm2@xxxxxxxxxxxxx
  • Date: Tue, 4 Dec 2012 12:36:41 +0100

On Tue, Dec 4, 2012 at 1:05 AM,  <tpgww@xxxxxxxxxxx> wrote:
> No, it's about the differences between gtk2 and gtk3.
>
> About 2/3 down in Makefile these lines occur:
> $(TARGET): $(OBJECTS)
>         @echo "linking binary '$(TARGET)'"
>         @$(CC) $(LDFLAGS) $(OBJECTS) -o $(TARGET) -Wl,--as-needed $(lLIBS)
>
> Edit the file, to remove the leading '@' from the last of them.
>
> Similarly, a bit further down:
>
> $(OBJECTS): $(OBJECTS_DIR)/%.o: %.c
>         @echo "compiling '$*.c'"
>         @$(CC) $(lCFLAGS) -c -o $@ $*.c
>
> Again, remove the leading '@' from the last of them.
>
> Then rebuild, displaying all includes, libs, etc in use. Check for sometimes 
> gtk2, others gtk3.
>

OK, let's get back to the basics. When I do a basic compilation for
r2585 then all happens as expected:
>make WITH_GTK2=1  (14320)
[..log attached..]
>make WITH_GTK2=1 (14320) returned '0'

>make install  (15493)
installing plugins to prefix '/usr/local'
installing emelfm2 to prefix '/usr/local'
install: cannot stat `icons/emelfm2.png': No such file or directory
>make install (15493) returned '0'


>> But it seems to me that 'make clean' fails in this case, as it says
>> 'cleaning up' but the 'emelfm2-svn' binary doesn't get deleted.
>
> The variable TARGET used in the Makefile is not persistent, unless you 
> actually edit the relevant line in Makefile.config. Otherwise, you'd need to 
> specify the variable in each make command.
> BTW, the relevant line in Makefile.config is
> TARGET = emelfm2
> But to allow it to be overridden at runtime, the line should be
> TARGET ?= emelfm2
>
When, though, I try to mess with the TARGET variable, then things go
awry. If I change Makefile and Makefile.config as indicated above,
then I get this:

>make WITH_GTK2=1 TARGET=emelfm2-svn  (16190)
[..log attached..]
>make WITH_GTK2=1 TARGET=emelfm2-svn (16190) returned '0'

>make install  (17684)
echo "linking binary 'emelfm2'"
linking binary 'emelfm2'
cc  objs/src/e2_bookmark.o objs/src/e2_context_menu.o
objs/src/e2_dnd.o objs/src/e2_filelist.o objs/src/e2_filetype.o
objs/src/e2_fileview.o objs/src/e2_keybinding.o objs/src/e2_main.o
objs/src/e2_mousebinding.o objs/src/e2_mousegesture.o
objs/src/e2_output.o objs/src/e2_pane.o objs/src/e2_plugins.o
objs/src/e2_print.o objs/src/e2_task_backend.o objs/src/e2_task.o
objs/src/e2_toolbar.o objs/src/e2_window.o objs/src/stroke.o
objs/src/actions/e2_action.o objs/src/actions/e2_action_option.o
objs/src/command/e2_alias.o objs/src/command/e2_command.o
objs/src/command/complete/e2_complete.o
objs/src/command/complete/e2_complete__mount.o
objs/src/command/complete/e2_complete__path.o
objs/src/config/e2_cache.o objs/src/config/e2_cl_option.o
objs/src/config/e2_option_bool.o objs/src/config/e2_option.o
objs/src/config/e2_option_color.o objs/src/config/e2_option__default.o
objs/src/config/e2_option_int.o objs/src/config/e2_option_sel.o
objs/src/config/e2_option_str.o objs/src/config/e2_option_tree.o
objs/src/config/e2_option_tree_context_menu.o
objs/src/config/e2_option_unknown.o objs/src/dialogs/e2_about_dialog.o
objs/src/dialogs/e2_config_dialog.o
objs/src/dialogs/e2_date_filter_dialog.o objs/src/dialogs/e2_dialog.o
objs/src/dialogs/e2_edit_dialog.o
objs/src/dialogs/e2_edit_dialog_undo.o
objs/src/dialogs/e2_file_info_dialog.o
objs/src/dialogs/e2_filetype_dialog.o
objs/src/dialogs/e2_gesture_dialog.o
objs/src/dialogs/e2_mkdir_dialog.o
objs/src/dialogs/e2_name_filter_dialog.o
objs/src/dialogs/e2_ownership_dialog.o
objs/src/dialogs/e2_password_dialog.o
objs/src/dialogs/e2_permissions_dialog.o
objs/src/dialogs/e2_select_dir_dialog.o
objs/src/dialogs/e2_select_image_dialog.o
objs/src/dialogs/e2_size_filter_dialog.o
objs/src/dialogs/e2_tree_dialog.o objs/src/dialogs/e2_view_dialog.o
objs/src/filesystem/e2_devkit.o objs/src/filesystem/e2_fs.o
objs/src/filesystem/e2_fs_FAM.o
objs/src/filesystem/e2_fs_FAM_inotify.o
objs/src/filesystem/e2_fs_mount.o objs/src/filesystem/e2_fs_walk.o
objs/src/filesystem/e2_hal.o objs/src/utils/debug.o
objs/src/utils/e2_button.o objs/src/utils/e2_combobox.o
objs/src/utils/e2_command_line.o objs/src/utils/e2_hook.o
objs/src/utils/e2_list.o objs/src/utils/e2_menu.o
objs/src/utils/e2_textiter.o objs/src/utils/e2_tree.o
objs/src/utils/e2_utf8.o objs/src/utils/e2_utils.o
objs/src/utils/e2_widget.o -o emelfm2 -Wl,--as-needed -lgtk-3
-latk-1.0 -lgio-2.0 -lgdk-3 -lpangocairo-1.0 -lgdk_pixbuf-2.0
-lcairo-gobject -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0
-Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lglib-2.0   -lrt -lm
-ldl
objs/src/e2_fileview.o: In function `_e2_fileview_set_font.isra.6':
e2_fileview.c:(.text+0x243d): undefined reference to
`gtk_tree_view_column_get_cell_renderers'
objs/src/e2_output.o: In function `_e2_output_tab_drop_new':
e2_output.c:(.text+0x1465): undefined reference to `gtk_notebook_get_group'
e2_output.c:(.text+0x1470): undefined reference to `gtk_notebook_set_group'
objs/src/e2_output.o: In function `e2_output_initialise':
e2_output.c:(.text+0x41f9): undefined reference to `gtk_notebook_set_group'
objs/src/e2_toolbar.o: In function `e2_toolbar_initialise_space_handler':
e2_toolbar.c:(.text+0x40a4): undefined reference to
`gtk_toolbar_get_orientation'
objs/src/e2_toolbar.o: In function `e2_toolbar_create':
e2_toolbar.c:(.text+0x5130): undefined reference to
`gtk_toolbar_set_orientation'
e2_toolbar.c:(.text+0x5418): undefined reference to
`gtk_toolbar_set_orientation'
objs/src/command/e2_command.o: In function `_e2_command_run_single':
e2_command.c:(.text+0x2239): undefined reference to
`gtk_combo_box_entry_get_type'
e2_command.c:(.text+0x2b9b): undefined reference to
`gtk_combo_box_entry_get_type'
objs/src/dialogs/e2_about_dialog.o: In function `_e2_about_dialog_open':
e2_about_dialog.c:(.text+0x93): undefined reference to
`gtk_dialog_set_has_separator'
objs/src/dialogs/e2_config_dialog.o: In function `_e2_confdlg_font_select_cb':
e2_config_dialog.c:(.text+0xe17): undefined reference to
`gtk_font_selection_dialog_get_apply_button'
objs/src/dialogs/e2_date_filter_dialog.o: In function
`e2_date_filter_dialog_create_cb':
e2_date_filter_dialog.c:(.text+0x7e6): undefined reference to
`gtk_object_get_type'
objs/src/dialogs/e2_name_filter_dialog.o: In function
`e2_name_filter_dialog_create_cb':
e2_name_filter_dialog.c:(.text+0x3a0): undefined reference to
`gtk_object_get_type'
objs/src/dialogs/e2_ownership_dialog.o: In function `e2_ownership_dialog_run':
e2_ownership_dialog.c:(.text+0xac9): undefined reference to
`gtk_dialog_set_has_separator'
objs/src/dialogs/e2_permissions_dialog.o: In function
`e2_permissions_dialog_run':
e2_permissions_dialog.c:(.text+0x4b7): undefined reference to
`gtk_dialog_set_has_separator'
objs/src/dialogs/e2_select_image_dialog.o: In function `e2_sid_create':
e2_select_image_dialog.c:(.text+0x92d): undefined reference to
`gtk_object_get_type'
e2_select_image_dialog.c:(.text+0x1157): undefined reference to
`gtk_icon_view_set_orientation'
e2_select_image_dialog.c:(.text+0x1167): undefined reference to
`gtk_icon_view_set_orientation'
objs/src/dialogs/e2_size_filter_dialog.o: In function
`e2_size_filter_dialog_create_cb':
e2_size_filter_dialog.c:(.text+0x488): undefined reference to
`gtk_object_get_type'
objs/src/dialogs/e2_tree_dialog.o: In function `_e2_tree_dialog_run':
e2_tree_dialog.c:(.text+0x18e3): undefined reference to `gtk_object_get_type'
objs/src/utils/e2_command_line.o: In function `e2_command_line_create':
e2_command_line.c:(.text+0x1aec): undefined reference to `gtk_object_get_type'
e2_command_line.c:(.text+0x1c84): undefined reference to `gtk_object_get_type'
collect2: ld returned 1 exit status
make: *** [emelfm2] Error 1
>make install (17684) returned '2'


I'm not sure what exactly to inspect for in the attached logs. Do they
contain clues on the issue?

Liviu

Attachment: emel-default-compilation.log
Description: Binary data

Attachment: emel-custom-target-compilation.log
Description: Binary data

Other related posts: