Problems compiling Gtk-0.5120 and Gtk-Perl-0.6123

Problems compiling Gtk-0.5120 and Gtk-Perl-0.6123

Post by Oliver Schweissgu » Tue, 06 Feb 2001 18:47:12



I want to compile Gtk-0.5120 and Gtk-Perl-0.6123 on an Ultra60 running
Solaris 8 and gcc.
I got this message:

cc -c -I/usr/openwin/include -I/usr/local/lib/glib/include
-I/usr/local/include  -I./Gtk -I./GdkImlib/ -I./build  -xO3 -xdepend  
-DVERSION=\"0.5120\" -DXS_VERSION=\"0.5120\" -KPIC
-I/usr/perl5/5.00503/sun4-solaris/CORE -DGTK_HVER=0x010206
build/GtkDefs.c
/usr/ucb/cc:  language optional software package not installed
make: *** [build/GtkDefs.o] Error 1

How can I change the Makefile to work with gcc?
Or where can I find the binary-pkgs?

Thanks

Oliver

 
 
 

Problems compiling Gtk-0.5120 and Gtk-Perl-0.6123

Post by Martin Pau » Tue, 06 Feb 2001 19:57:06




> cc -c -I/usr/openwin/include -I/usr/local/lib/glib/include
> -I/usr/local/include  -I./Gtk -I./GdkImlib/ -I./build  -xO3 -xdepend  
> -DVERSION=\"0.5120\" -DXS_VERSION=\"0.5120\" -KPIC
> -I/usr/perl5/5.00503/sun4-solaris/CORE -DGTK_HVER=0x010206
> build/GtkDefs.c
> /usr/ucb/cc:  language optional software package not installed
> make: *** [build/GtkDefs.o] Error 1

> How can I change the Makefile to work with gcc?

Two ways (if the building process uses "configure"):

  $ CC=gcc
  $ export CC
  $ ./configure

or

  $ make test CC=gcc

hth, mp.
--
                         Martin Paul | Systems Administrator

Liechtensteinstrasse 22, A-1090 Wien | Tel: 01 4277 38803
        http://www.par.univie.ac.at/ | Fax: 01 4277 9388

 
 
 

Problems compiling Gtk-0.5120 and Gtk-Perl-0.6123

Post by Oliver Schweissgu » Wed, 07 Feb 2001 03:45:26


Quote:> > How can I change the Makefile to work with gcc?
> Two ways (if the building process uses "configure"):

Ok. But without 'configure'?

The building process is like this:
'perl Makefile.PL'
'make test'
'make install'

With make 'test CC=gcc' I get:
[...]
gcc: Gtk/GtkTypes.c: linker input file unused since linking not done
gcc -c -I/usr/openwin/include -I/usr/local/lib/glib/include
-I/usr/local/include  -I./Gtk -I./GdkImlib/ -I./build  -xO3 -xdepend  
-DVERSION=\"0.5120\" -DXS_VERSION=\"0.5120\" -KPIC
-I/usr/perl5/5.00503/sun4-solaris/CORE -DGTK_HVER=0x010206
Gtk/MiscTypes.c
gcc: unrecognized option `-KPIC'
gcc: language depend not recognized
[...]

What does -KPIC do?

Oliver

 
 
 

Problems compiling Gtk-0.5120 and Gtk-Perl-0.6123

Post by Markus Maye » Wed, 07 Feb 2001 05:54:20


[...]

Quote:> With make 'test CC=gcc' I get:
> [...]
> gcc: Gtk/GtkTypes.c: linker input file unused since linking not done
> gcc -c -I/usr/openwin/include -I/usr/local/lib/glib/include
> -I/usr/local/include  -I./Gtk -I./GdkImlib/ -I./build  -xO3 -xdepend  
> -DVERSION=\"0.5120\" -DXS_VERSION=\"0.5120\" -KPIC
> -I/usr/perl5/5.00503/sun4-solaris/CORE -DGTK_HVER=0x010206
> Gtk/MiscTypes.c
> gcc: unrecognized option `-KPIC'
> gcc: language depend not recognized
> What does -KPIC do?

That switch is supposed to generate "Position Independent Code", i. e. a
shared object. -KPIC only works for Sun's own compiler. For gcc the correct
switch is -fPIC. The Perl configuration procedure uses the same switches
that were used to configure Perl. And Sun used their Sun Workshop compiler
to build Perl, so all compiler-switches are for this compiler and some won't
work with gcc.

The next switches gcc will complain about (after you have replaced -KPIC by
-fPIC) are -xO3 and -xdepend. Neither is recognized by gcc.

Regards,
Markus

 
 
 

1. UPDATE: Compiling GTK/Perl with Perl 5.004 on Solaris

FYI:

Thanks to everyone who responded to this (Kenneth Albanowski, David
Monniaux, Greg Onufer).  I did successfully compile GTK/Perl 0.3 actually on
Solaris 2.51 with perl 5.004_04.  I had to recompile Perl with the
-fPIC option.  Once I did that, the Makefile generated for GTK/Perl
automatically contained -fPIC (without any hacking) and everything
worked fine.

-Moe

2. IBM PC Server 720

3. Problem compiling GTK/Perl 0.2.04 on solaris

4. OpenWindows "Freezes" for Several Minutes

5. rpm problems: gtk vs gtk+

6. Corel Office 2000 on RedHat 7.1

7. Gimp/gtk+/gtk-- upgrades/install problems

8. Run Away User Processes->Killed My Server

9. Gtk-Perl compile error

10. Compiling gtk-perl on a FreeBSD box

11. GTK guru -> program crashes complaining about gtk.......

12. GTK for shell scripts: the gtk-server

13. Missing gtk-config while blding gvim w/ gtk