Hallo!
Ich hatte über diese Sache schon eine längere Diskussion mit Vincent im Bugtracker, dort konnte das Problem allerdings nicht verifiziert werden.
Also, könnte mal jemand testweise ein neues Lazarus-Projekt im aktuellen SVN-Build erstellen, das Widgetset auf GTK2 umschalten und dann folgende units in die uses-liste einfügen:
/usr/lib/lazarus/lcl/units/x86_64-linux/gtk2/gtkint.o: In function `CREATE':
/usr/lib/lazarus/lcl/interfaces/gtk2//../gtk/gtkwidgetset.inc:190: undefined reference to `g_thread_init'
?
Wenn ja und wenn nicht: Welche Linux-Distribution habt ihr und welche version? Dieser Fehler macht mich hier noch ganz verrückt!
Zuletzt geändert von Targion am Di 4. Aug 2009, 22:27, insgesamt 1-mal geändert.
Free Pascal Compiler version 2.2.4 [2009/03/28] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Linux for i386
Compiling /tmp/project1.lpr
Compiling unit1.pas
unit1.pas(8,92) Hint: Unit "gtk2" not used in Unit1
unit1.pas(8,103) Hint: Unit "gdkpixbuf" not used in Unit1
unit1.pas(8,117) Hint: Unit "gdk2" not used in Unit1
Linking /tmp/project1
/usr/bin/ld: cannot find -lgdk_pixbuf
project1.lpr(20,1) Error: Error while linking
project1.lpr(20,1) Fatal: There were 1 errors compiling module, stopping
TMessagesView.CollectLineParts WARNING: 13<>11 SrcLine=project1.lpr(20,1) Fatal: There were 1 errors compiling module, stopping
Free Pascal Compiler version 2.2.4 [2009/03/28] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Linux for i386
Compiling /tmp/project1.lpr
Compiling unit1.pas
unit1.pas(8,92) Hint: Unit "gtk2" not used in Unit1
unit1.pas(8,103) Hint: Unit "gdkpixbuf" not used in Unit1
unit1.pas(8,117) Hint: Unit "gdk2" not used in Unit1
Linking /tmp/project1
/usr/bin/ld: cannot find -lgdk_pixbuf[code]
[/quote]
So what gives,
ls -l /usr/lib/libgdk_pixbuf*
and
locate libgdk_pixbuf.so
Da fehlen einfach Symlinks und libgdk_pixbuf.so.2.0.0. Bei mir funktioniert's und da sieht die Ausgabe so aus: (siehe: /usr/lib/libgdk_pixbuf.so -> libgdk_pixbuf.so.2.0.0)
/usr/lib/lazarus/lcl/units/x86_64-linux/gtk2/gtkint.o: In function `CREATE':
/usr/lib/lazarus/lcl/interfaces/gtk2//../gtk/gtkwidgetset.inc:190: undefined reference to `g_thread_init'
Disable Thread-Support for GTK2 solves this, but this is no solution.
And why did everything work with an old Lazarus SVN version?
Bezweifel ich - denn gdk-pixbuf-2.0 ist etwas anderes als gdk-pixbuf! Das siehst du auch ganz gut in theo's symlinks, wo beide Libs durchaus unterschiedliche Versionen haben.
theo@linux-1mxm:~> nm -D /usr/lib/libgdk_pixbuf.so.2.0.0
w _Jv_RegisterClasses
0001668c A __bss_start
U __ctype_b_loc
U __ctype_tolower_loc
w __cxa_finalize
U __errno_location
w __gmon_start__
U __memcpy_chk
U __stack_chk_fail
0001668c A _edata
000166b8 A _end
0000eaa8 T _fini
00003ab4 T _init
U ceil
U fclose
U fgets
U floor
U fopen
U fread
U free
U fseek
U g_free
U g_hash_table_insert
U g_hash_table_lookup
U g_hash_table_new
U g_list_append
U g_list_free
U g_list_prepend
U g_log
U g_malloc
U g_malloc0
U g_module_build_path
U g_module_error
U g_module_open
U g_module_symbol
U g_str_equal
U g_str_hash
U g_strconcat
U g_strdup
U gdk_bitmap_unref
U gdk_colormap_get_visual
U gdk_draw_line
U gdk_draw_rectangle
U gdk_draw_rgb_image_dithalign
U gdk_gc_new
U gdk_gc_set_clip_mask
U gdk_gc_set_clip_origin
U gdk_gc_set_foreground
U gdk_gc_unref
U gdk_image_destroy
U gdk_image_get
U gdk_image_get_pixel
0000a2b0 T gdk_pixbuf_add_alpha
00004d60 T gdk_pixbuf_animation_get_frames
00004e40 T gdk_pixbuf_animation_get_height
00004dd0 T gdk_pixbuf_animation_get_num_frames
00004eb0 T gdk_pixbuf_animation_get_width
000050e0 T gdk_pixbuf_animation_new_from_file
00004f20 T gdk_pixbuf_animation_ref
00004ff0 T gdk_pixbuf_animation_unref
000099e0 T gdk_pixbuf_composite
00009520 T gdk_pixbuf_composite_color
00009820 T gdk_pixbuf_composite_color_simple
00004840 T gdk_pixbuf_copy
0000a0c0 T gdk_pixbuf_copy_area
00016694 B gdk_pixbuf_dpy
00004990 T gdk_pixbuf_finalize
00004b30 T gdk_pixbuf_frame_get_action
00004ba0 T gdk_pixbuf_frame_get_delay_time
00004cf0 T gdk_pixbuf_frame_get_pixbuf
00004c80 T gdk_pixbuf_frame_get_x_offset
00004c10 T gdk_pixbuf_frame_get_y_offset
00004370 T gdk_pixbuf_get_bits_per_sample
000044d0 T gdk_pixbuf_get_colorspace
00006640 T gdk_pixbuf_get_from_drawable
000043e0 T gdk_pixbuf_get_has_alpha
00004220 T gdk_pixbuf_get_height
000071a0 T gdk_pixbuf_get_module
00004460 T gdk_pixbuf_get_n_channels
00004300 T gdk_pixbuf_get_pixels
000041b0 T gdk_pixbuf_get_rowstride
00004290 T gdk_pixbuf_get_width
00007330 T gdk_pixbuf_load_module
00007a20 T gdk_pixbuf_loader_close
00007f60 T gdk_pixbuf_loader_get_animation
00008020 T gdk_pixbuf_loader_get_pixbuf
000079d0 T gdk_pixbuf_loader_get_type
000082f0 T gdk_pixbuf_loader_new
00008100 T gdk_pixbuf_loader_write
0000eb60 R gdk_pixbuf_major_version
0000eb68 R gdk_pixbuf_micro_version
0000eb64 R gdk_pixbuf_minor_version
00004690 T gdk_pixbuf_new
000053e0 T gdk_pixbuf_new_from_data
00007600 T gdk_pixbuf_new_from_file
00007580 T gdk_pixbuf_new_from_xpm_data
0000a8b0 T gdk_pixbuf_parse_color
000041a0 T gdk_pixbuf_postinit
00004190 T gdk_pixbuf_preinit
000045c0 T gdk_pixbuf_ref
00008ff0 T gdk_pixbuf_render_pixmap_and_mask
00008b80 T gdk_pixbuf_render_threshold_alpha
00008700 T gdk_pixbuf_render_to_drawable
000091a0 T gdk_pixbuf_render_to_drawable_alpha
00009cc0 T gdk_pixbuf_scale
00009f60 T gdk_pixbuf_scale_simple
00014184 D gdk_pixbuf_screen
00004540 T gdk_pixbuf_set_last_unref_handler
00004a50 T gdk_pixbuf_unref
00014188 D gdk_pixbuf_version
U gdk_pixmap_new
U gdk_rgb_get_visual
U gdk_screen_height
U gdk_screen_width
U gdk_window_get_colormap
U gdk_window_get_origin
U gdk_window_get_size
U gdk_window_get_type
U gdk_window_is_viewable
U gtk_marshal_NONE__NONE
U gtk_marshal_NONE__POINTER
U gtk_object_class_add_signals
U gtk_object_get_type
U gtk_signal_emit
U gtk_signal_new
U gtk_type_check_class_cast
U gtk_type_check_object_cast
U gtk_type_class
U gtk_type_is_a
U gtk_type_new
U gtk_type_unique
00014340 D local_rgb_txt
U malloc
U memcpy
0000d4d0 T pixops_composite
0000db20 T pixops_composite_color
0000e700 T pixops_composite_line_22_4a4_mmx
0000e8a0 T pixops_composite_line_color_22_4a4_mmx
0000e5b0 T pixops_have_mmx
0000d000 T pixops_scale
0000e5e0 T pixops_scale_line_22_33_mmx
U strchr
U strtol
theo@linux-1mxm:~> nm -D /usr/lib/libgdk_pixbuf-2.0.so.0.1400.4
w _Jv_RegisterClasses
w __cxa_finalize
U __errno_location
U __fread_chk
w __gmon_start__
U __stack_chk_fail
U ceil
U dcgettext
U dcngettext
U fclose
U fdopen
U feof
U ferror
U floor
U fopen64
U fread
U fseek
U fwrite
U g_ascii_strcasecmp
U g_ascii_strtoll
U g_ascii_strup
U g_ascii_table
U g_assertion_message
U g_assertion_message_expr
U g_build_filename
U g_cclosure_marshal_VOID__VOID
U g_dgettext
U g_enum_register_static
U g_error_free
U g_file_error_from_errno
U g_file_error_quark
U g_file_open_tmp
U g_filename_display_name
U g_free
U g_get_current_time
U g_getenv
U g_input_stream_read
U g_intern_static_string
U g_io_channel_new_file
U g_io_channel_read_line
U g_io_channel_unref
U g_io_error_quark
U g_list_append
U g_list_free
U g_list_last
U g_list_length
U g_log
U g_malloc
U g_malloc0
U g_module_error
U g_module_open
U g_module_symbol
U g_object_class_install_property
U g_object_get_qdata
U g_object_new
U g_object_ref
U g_object_set_qdata_full
U g_object_steal_qdata
U g_object_unref
U g_once_init_enter_impl
U g_once_init_leave
U g_output_stream_write
U g_param_spec_boolean
U g_param_spec_enum
U g_param_spec_int
U g_param_spec_pointer
U g_propagate_error
U g_quark_from_static_string
U g_realloc
U g_return_if_fail_warning
U g_set_error
U g_set_error_literal
U g_signal_connect_data
U g_signal_emit
U g_signal_new
U g_slist_free
U g_slist_length
U g_slist_nth_data
U g_slist_prepend
U g_static_mutex_get_mutex_impl
U g_strcompress
U g_strdup
U g_strdup_printf
U g_strdupv
U g_strerror
U g_strfreev
U g_string_append
U g_string_append_printf
U g_string_free
U g_string_insert_c
U g_string_new
U g_string_truncate
U g_strndup
U g_thread_functions_for_glib_use
U g_thread_use_default_impl
U g_threads_got_initialized
U g_try_malloc
U g_try_realloc
U g_type_check_instance_is_a
U g_type_class_peek_parent
U g_type_name
U g_type_register_static_simple
U g_unlink
U g_value_get_boolean
U g_value_get_enum
U g_value_get_int
U g_value_get_pointer
U g_value_peek_pointer
U g_value_set_boolean
U g_value_set_enum
U g_value_set_int
U g_value_set_pointer
0000f9c0 T gdk_colorspace_get_type
0000f920 T gdk_interp_type_get_type
0000ca50 T gdk_pixbuf_add_alpha
0000fa10 T gdk_pixbuf_alpha_mode_get_type
00005900 T gdk_pixbuf_animation_get_height
00005be0 T gdk_pixbuf_animation_get_iter
00005a20 T gdk_pixbuf_animation_get_static_image
00005380 T gdk_pixbuf_animation_get_type
00005990 T gdk_pixbuf_animation_get_width
00005aa0 T gdk_pixbuf_animation_is_static_image
00005b20 T gdk_pixbuf_animation_iter_advance
00005870 T gdk_pixbuf_animation_iter_get_delay_time
000057e0 T gdk_pixbuf_animation_iter_get_pixbuf
00005200 T gdk_pixbuf_animation_iter_get_type
00005750 T gdk_pixbuf_animation_iter_on_currently_loading_frame
00005ca0 T gdk_pixbuf_animation_new_from_file
000051d0 T gdk_pixbuf_animation_ref
000056d0 T gdk_pixbuf_animation_unref
0000c2b0 T gdk_pixbuf_apply_embedded_orientation
0000b030 T gdk_pixbuf_composite
0000acb0 T gdk_pixbuf_composite_color
0000aee0 T gdk_pixbuf_composite_color_simple
00004740 T gdk_pixbuf_copy
0000c430 T gdk_pixbuf_copy_area
0000f970 T gdk_pixbuf_error_get_type
00003b50 T gdk_pixbuf_error_quark
00004080 T gdk_pixbuf_fill
0000a830 T gdk_pixbuf_flip
00007210 T gdk_pixbuf_format_get_description
00007150 T gdk_pixbuf_format_get_extensions
00006f10 T gdk_pixbuf_format_get_license
000071b0 T gdk_pixbuf_format_get_mime_types
000070f0 T gdk_pixbuf_format_get_name
00006fd0 T gdk_pixbuf_format_is_disabled
00007030 T gdk_pixbuf_format_is_scalable
00007090 T gdk_pixbuf_format_is_writable
00006f70 T gdk_pixbuf_format_set_disabled
0000d2b0 T gdk_pixbuf_from_pixdata
000043e0 T gdk_pixbuf_get_bits_per_sample
00004560 T gdk_pixbuf_get_colorspace
00007760 T gdk_pixbuf_get_file_info
00006eb0 T gdk_pixbuf_get_formats
00004460 T gdk_pixbuf_get_has_alpha
00004260 T gdk_pixbuf_get_height
000044e0 T gdk_pixbuf_get_n_channels
00003f90 T gdk_pixbuf_get_option
00004360 T gdk_pixbuf_get_pixels
000041e0 T gdk_pixbuf_get_rowstride
00003d30 T gdk_pixbuf_get_type
000042e0 T gdk_pixbuf_get_width
00009e70 T gdk_pixbuf_loader_close
0000a0e0 T gdk_pixbuf_loader_get_animation
00009de0 T gdk_pixbuf_loader_get_format
0000a160 T gdk_pixbuf_loader_get_pixbuf
00009d40 T gdk_pixbuf_loader_get_type
0000a3c0 T gdk_pixbuf_loader_new
0000a1f0 T gdk_pixbuf_loader_new_with_mime_type
0000a300 T gdk_pixbuf_loader_new_with_type
00009710 T gdk_pixbuf_loader_set_size
0000a3f0 T gdk_pixbuf_loader_write
000147a8 R gdk_pixbuf_major_version
000147b0 R gdk_pixbuf_micro_version
000147ac R gdk_pixbuf_minor_version
00003be0 T gdk_pixbuf_new
00006180 T gdk_pixbuf_new_from_data
000093a0 T gdk_pixbuf_new_from_file
00007e40 T gdk_pixbuf_new_from_file_at_scale
00008270 T gdk_pixbuf_new_from_file_at_size
0000d690 T gdk_pixbuf_new_from_inline
00007d00 T gdk_pixbuf_new_from_stream
00007d60 T gdk_pixbuf_new_from_stream_at_scale
00009270 T gdk_pixbuf_new_from_xpm_data
000045e0 T gdk_pixbuf_new_subpixbuf
00005420 T gdk_pixbuf_non_anim_get_type
000054d0 T gdk_pixbuf_non_anim_new
00003b80 T gdk_pixbuf_ref
0000a970 T gdk_pixbuf_rotate_simple
0000f8d0 T gdk_pixbuf_rotation_get_type
0000c5b0 T gdk_pixbuf_saturate_and_pixelate
000091a0 T gdk_pixbuf_save
00008d10 T gdk_pixbuf_save_to_buffer
00008c10 T gdk_pixbuf_save_to_bufferv
00008de0 T gdk_pixbuf_save_to_callback
00008780 T gdk_pixbuf_save_to_callbackv
00008b70 T gdk_pixbuf_save_to_stream
00008eb0 T gdk_pixbuf_savev
0000b240 T gdk_pixbuf_scale
0000b430 T gdk_pixbuf_scale_simple
0000c0d0 T gdk_pixbuf_scaled_anim_get_type
0000bcf0 T gdk_pixbuf_scaled_anim_iter_get_type
00003dd0 T gdk_pixbuf_set_option
0000b620 T gdk_pixbuf_simple_anim_add_frame
0000bad0 T gdk_pixbuf_simple_anim_get_type
0000b710 T gdk_pixbuf_simple_anim_iter_get_type
0000bb80 T gdk_pixbuf_simple_anim_new
00003bb0 T gdk_pixbuf_unref
0001b1bc D gdk_pixbuf_version
0000d000 T gdk_pixdata_deserialize
0000d740 T gdk_pixdata_from_pixbuf
0000dc50 T gdk_pixdata_serialize
0000de50 T gdk_pixdata_to_csource
U memcpy
U rewind
U strcmp
U strtol
Nein die sind nicht gleich. gdk_pixbuf ist die Version für GTK1, gdk_pixbuf-2.0 ist die Version für GTK2 - zugegeben, die Versionsnummern sind irreführend, aber NICHT identisch!
Targion hat geschrieben:Hallo!
Ich hatte über diese Sache schon eine längere Diskussion mit Vincent im Bugtracker, dort konnte das Problem allerdings nicht verifiziert werden.
Also, könnte mal jemand testweise ein neues Lazarus-Projekt im aktuellen SVN-Build erstellen, das Widgetset auf GTK2 umschalten und dann folgende units in die uses-liste einfügen:
/usr/lib/lazarus/lcl/units/x86_64-linux/gtk2/gtkint.o: In function `CREATE':
/usr/lib/lazarus/lcl/interfaces/gtk2//../gtk/gtkwidgetset.inc:190: undefined reference to `g_thread_init'
listallgo.lpr(44,1) Error: Error while linking
(If all symlinks are created)
Zuletzt geändert von Targion am Mo 3. Aug 2009, 22:51, insgesamt 1-mal geändert.