[solved] Lazarus-SVN, GTK2 und Linken

Für Fehler in Lazarus, um diese von anderen verifizieren zu lassen.
Targion
Beiträge: 688
Registriert: Mi 3. Okt 2007, 21:00
OS, Lazarus, FPC: Linux (L 0.9.29 FPC 2.4.2)
CPU-Target: x86_64

[solved] Lazarus-SVN, GTK2 und Linken

Beitrag von Targion »

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:

Code: Alles auswählen

uses gtkdef, gtk2, gdkpixbuf, gtkint, gdk2;
Dann das ganze kompilieren.
Kommen bei euch Meldungen wie

Code: Alles auswählen

/usr/bin/ld: cannot find -lgdk_pixbuf
oder

Code: Alles auswählen

/usr/bin/ld: cannot find -lgtk
oder

Code: Alles auswählen

/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.

monta
Lazarusforum e. V.
Beiträge: 2809
Registriert: Sa 9. Sep 2006, 18:05
OS, Lazarus, FPC: Linux (L trunk FPC trunk)
CPU-Target: 64Bit
Wohnort: Dresden
Kontaktdaten:

Re: Lazarus-SVN, GTK2 und Linken

Beitrag von monta »

Ja:

Code: Alles auswählen

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
System:
Debian Lenny
FPC: 2.2.4
Lazarus: SVN Rev. 21091 mit GTK2 erstellt
Johannes

Vincent
Beiträge: 17
Registriert: Do 20. Sep 2007, 14:05

Re: Lazarus-SVN, GTK2 und Linken

Beitrag von Vincent »

monta hat geschrieben:Ja:

Code: Alles auswählen

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

monta
Lazarusforum e. V.
Beiträge: 2809
Registriert: Sa 9. Sep 2006, 18:05
OS, Lazarus, FPC: Linux (L trunk FPC trunk)
CPU-Target: 64Bit
Wohnort: Dresden
Kontaktdaten:

Re: Lazarus-SVN, GTK2 und Linken

Beitrag von monta »

Code: Alles auswählen

wolf@Lazarusbuildenvironment:~$ ls -l /usr/lib/libgdk_pixbuf*
-rw-r--r-- 1 root root 306680  2. Mär 19:27 /usr/lib/libgdk_pixbuf-2.0.a
-rw-r--r-- 1 root root    864  2. Mär 19:26 /usr/lib/libgdk_pixbuf-2.0.la
lrwxrwxrwx 1 root root     30 10. Jul 20:02 /usr/lib/libgdk_pixbuf-2.0.so -> libgdk_pixbuf-2.0.so.0.1200.12
lrwxrwxrwx 1 root root     30 10. Jul 19:58 /usr/lib/libgdk_pixbuf-2.0.so.0 -> libgdk_pixbuf-2.0.so.0.1200.12
-rw-r--r-- 1 root root  96712  2. Mär 19:27 /usr/lib/libgdk_pixbuf-2.0.so.0.1200.12
-rw-r--r-- 1 root root  64472  2. Mär 19:27 /usr/lib/libgdk_pixbuf_xlib-2.0.a
-rw-r--r-- 1 root root    894  2. Mär 19:26 /usr/lib/libgdk_pixbuf_xlib-2.0.la
lrwxrwxrwx 1 root root     35 10. Jul 20:02 /usr/lib/libgdk_pixbuf_xlib-2.0.so -> libgdk_pixbuf_xlib-2.0.so.0.1200.12
lrwxrwxrwx 1 root root     35 10. Jul 19:58 /usr/lib/libgdk_pixbuf_xlib-2.0.so.0 -> libgdk_pixbuf_xlib-2.0.so.0.1200.12
-rw-r--r-- 1 root root  57948  2. Mär 19:27 /usr/lib/libgdk_pixbuf_xlib-2.0.so.0.1200.12
and

Code: Alles auswählen

wolf@Lazarusbuildenvironment:~$ locate libgdk_pixbuf.so
wolf@Lazarusbuildenvironment:~$
is the second one the problem?
Johannes

Benutzeravatar
theo
Beiträge: 10949
Registriert: Mo 11. Sep 2006, 19:01

Re: Lazarus-SVN, GTK2 und Linken

Beitrag von theo »

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)

Code: Alles auswählen

-rw-r--r-- 1 root root   1026 14. Apr 14:08 /usr/lib/libgdk_pixbuf-2.0.la
lrwxrwxrwx 1 root root     29 28. Apr 18:43 /usr/lib/libgdk_pixbuf-2.0.so -> libgdk_pixbuf-2.0.so.0.1400.4
lrwxrwxrwx 1 root root     29 28. Apr 18:42 /usr/lib/libgdk_pixbuf-2.0.so.0 -> libgdk_pixbuf-2.0.so.0.1400.4
-rwxr-xr-x 1 root root 108528 14. Apr 14:09 /usr/lib/libgdk_pixbuf-2.0.so.0.1400.4
-rw-r--r-- 1 root root 275380  9. Dez 2008  /usr/lib/libgdk_pixbuf.a
-rw-r--r-- 1 root root   1162  9. Dez 2008  /usr/lib/libgdk_pixbuf.la
lrwxrwxrwx 1 root root     22 30. Dez 2008  /usr/lib/libgdk_pixbuf.so -> libgdk_pixbuf.so.2.0.0
lrwxrwxrwx 1 root root     22 30. Dez 2008  /usr/lib/libgdk_pixbuf.so.2 -> libgdk_pixbuf.so.2.0.0
-rwxr-xr-x 1 root root  89272  9. Dez 2008  /usr/lib/libgdk_pixbuf.so.2.0.0
-rw-r--r-- 1 root root   1159 14. Apr 14:09 /usr/lib/libgdk_pixbuf_xlib-2.0.la
lrwxrwxrwx 1 root root     34 28. Apr 18:43 /usr/lib/libgdk_pixbuf_xlib-2.0.so -> libgdk_pixbuf_xlib-2.0.so.0.1400.4
lrwxrwxrwx 1 root root     34 28. Apr 18:42 /usr/lib/libgdk_pixbuf_xlib-2.0.so.0 -> libgdk_pixbuf_xlib-2.0.so.0.1400.4
-rwxr-xr-x 1 root root  63148 14. Apr 14:09 /usr/lib/libgdk_pixbuf_xlib-2.0.so.0.1400.4
-rw-r--r-- 1 root root 394900  9. Dez 2008  /usr/lib/libgdk_pixbuf_xlib.a
-rw-r--r-- 1 root root   1223  9. Dez 2008  /usr/lib/libgdk_pixbuf_xlib.la
lrwxrwxrwx 1 root root     27 30. Dez 2008  /usr/lib/libgdk_pixbuf_xlib.so -> libgdk_pixbuf_xlib.so.2.0.0
lrwxrwxrwx 1 root root     27 30. Dez 2008  /usr/lib/libgdk_pixbuf_xlib.so.2 -> libgdk_pixbuf_xlib.so.2.0.0
-rwxr-xr-x 1 root root 126172  9. Dez 2008  /usr/lib/libgdk_pixbuf_xlib.so.2.0.0

Targion
Beiträge: 688
Registriert: Mi 3. Okt 2007, 21:00
OS, Lazarus, FPC: Linux (L 0.9.29 FPC 2.4.2)
CPU-Target: x86_64

Re: Lazarus-SVN, GTK2 und Linken

Beitrag von Targion »

I created the following symlinks:

Code: Alles auswählen

ln -s -f /usr/lib/libgdk_pixbuf-2.0.so libgdk_pixbuf.so
ln -s -f /usr/lib/libgtk-x11-2.0.so libgtk.so
ln -s -f /usr/lib/libglib-2.0.so libglib.so
ln -s -f /usr/lib/libgdk-x11-2.0.so libgdk.so
now I get

Code: Alles auswählen

/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?

Benutzeravatar
theo
Beiträge: 10949
Registriert: Mo 11. Sep 2006, 19:01

Re: Lazarus-SVN, GTK2 und Linken

Beitrag von theo »

Siehst du das nicht etwas zu sportlich mit den links?

Bei mir zeigt
libgdk_pixbuf.so -> libgdk_pixbuf.so.2.0.0
und nicht wie bei dir
libgdk_pixbuf.so -> libgdk_pixbuf-2.0.so

Targion
Beiträge: 688
Registriert: Mi 3. Okt 2007, 21:00
OS, Lazarus, FPC: Linux (L 0.9.29 FPC 2.4.2)
CPU-Target: x86_64

Re: Lazarus-SVN, GTK2 und Linken

Beitrag von Targion »

Ich meine die Verknüpfung ist korrekt, auch, wenn das erste nach GTK1 aussieht. Diese Symlinks haben nämlich schon mal funktioniert.
(Ubuntu Jaunty)
Zuletzt geändert von Targion am Mo 3. Aug 2009, 22:49, insgesamt 1-mal geändert.

Hitman
Beiträge: 512
Registriert: Mo 25. Aug 2008, 18:17
OS, Lazarus, FPC: ArchLinux x86, WinVista x86-64, Lazarus 0.9.29, FPC 2.4.1
CPU-Target: x86
Wohnort: Chemnitz

Re: Lazarus-SVN, GTK2 und Linken

Beitrag von Hitman »

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.

Targion
Beiträge: 688
Registriert: Mi 3. Okt 2007, 21:00
OS, Lazarus, FPC: Linux (L 0.9.29 FPC 2.4.2)
CPU-Target: x86_64

Re: Lazarus-SVN, GTK2 und Linken

Beitrag von Targion »

Könnte der Compiler gegen eine falsche lib linken? Ich meine, das wäre nicht möglich also müssten die libs identisch sein.
Zuletzt geändert von Targion am Mo 3. Aug 2009, 22:50, insgesamt 1-mal geändert.

Benutzeravatar
theo
Beiträge: 10949
Registriert: Mo 11. Sep 2006, 19:01

Re: Lazarus-SVN, GTK2 und Linken

Beitrag von theo »

Bei mir exportieren die nicht genau das Gleiche afaics.

Code: Alles auswählen

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

Code: Alles auswählen

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

Hitman
Beiträge: 512
Registriert: Mo 25. Aug 2008, 18:17
OS, Lazarus, FPC: ArchLinux x86, WinVista x86-64, Lazarus 0.9.29, FPC 2.4.1
CPU-Target: x86
Wohnort: Chemnitz

Re: Lazarus-SVN, GTK2 und Linken

Beitrag von Hitman »

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!

Code: Alles auswählen

> ldd /usr/lib/libgdk_pixbuf-2.0.so                                                                                           ~
        linux-gate.so.1 =>  (0xb7f64000)
        libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0xb7ea6000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb7e6b000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb7e67000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb7db5000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7d8e000)
        libm.so.6 => /lib/libm.so.6 (0xb7d68000)
        libc.so.6 => /lib/libc.so.6 (0xb7c22000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7c1e000)
        libpcre.so.0 => /lib/libpcre.so.0 (0xb7bed000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7bd8000)
        /lib/ld-linux.so.2 (0xb7f65000)
(man sieht klar die GTK2 Referenzen)

Bei gdk_pixbuf hingegen sieht man klar nur GTK1 Referenzen:

Code: Alles auswählen

> ldd /usr/lib/libgdk_pixbuf.so.2.0.0                                                                                         ~
        linux-gate.so.1 =>  (0xb80b4000)
        libgtk-1.2.so.0 => /usr/lib/libgtk-1.2.so.0 (0xb7f19000)
        libgdk-1.2.so.0 => /usr/lib/libgdk-1.2.so.0 (0xb7ee0000)
        libgmodule-1.2.so.0 => /usr/lib/libgmodule-1.2.so.0 (0xb7edd000)
        libglib-1.2.so.0 => /usr/lib/libglib-1.2.so.0 (0xb7eb7000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7eb2000)
        libXi.so.6 => /usr/lib/libXi.so.6 (0xb7ea9000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0xb7e9a000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb7d7d000)
        libm.so.6 => /lib/libm.so.6 (0xb7d57000)
        libc.so.6 => /lib/libc.so.6 (0xb7c11000)
        /lib/ld-linux.so.2 (0xb80b5000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0xb7c0d000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb7bf4000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7bef000)

Vincent
Beiträge: 17
Registriert: Do 20. Sep 2007, 14:05

Re: Lazarus-SVN, GTK2 und Linken

Beitrag von Vincent »

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:

Code: Alles auswählen

uses gtkdef, gtk2, gdkpixbuf, gtkint, gdk2;
Why don't you use the gtk2 version of pixbuf, if everything else you are using is gtk2:

Code: Alles auswählen

uses gtkdef, gtk2, gdk2pixbuf, gtkint, gdk2;

Targion
Beiträge: 688
Registriert: Mi 3. Okt 2007, 21:00
OS, Lazarus, FPC: Linux (L 0.9.29 FPC 2.4.2)
CPU-Target: x86_64

Re: Lazarus-SVN, GTK2 und Linken

Beitrag von Targion »

Okay, this was a complete mistake. I mixed gtk1 and gtk2 libraries within the program, so I think this is resolved. :oops:
But I still get

Code: Alles auswählen

/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.

Benutzeravatar
theo
Beiträge: 10949
Registriert: Mo 11. Sep 2006, 19:01

Re: Lazarus-SVN, GTK2 und Linken

Beitrag von theo »

Bei dir sind halt alle Symlinks etwas sportlich:
ln -s -f /usr/lib/libgtk-x11-2.0.so libgtk.so
;-)

Antworten