compilation blues



Hi,
I'm having a lot of problems to completely compile the GNOME stuff.

I took the perl script someone posted few days ago and modified it to
suit my needs.
I have a clean CVS mirror in GNOME and I build into GNOME.build.
I install under /opt/GNOME to keep everything under control.

Here it goes (please do not laugh: this is my *first* perl script).
=============================================
#!/usr/bin/perl -w
use Cwd;

sub yesno {
  print @_, "[Yes|No]> ";
  my $yn = <STDIN>;
  chomp ($yn);
  $yn =~ tr/A-Z/a-z/;
  return $yn eq "yes";
}

if (! -d "GNOME") {
  die "I can't see the GNOME source dir!\n";
}

if (-d "GNOME.build") {
  if (yesno("Temporary dir present: do You want to refresh it? ")) {
    system "rm -rf GNOME.build";
  }
}

if (! -d "GNOME.build") {
  mkdir "GNOME.build",0777;
  system "cp -rdps `pwd`/GNOME/* GNOME.build";
}
chdir "GNOME.build";
  
if (!yesno("Temporary dir ready: do You want to proceed? ")) {
  exit 0;
}

#local variables specific to your installation
$prefix= "/opt/GNOME";
$gtk="/opt/GNOME";

$ENV{"ACLOCAL_FLAGS"} = "-I $prefix/share/aclocal";
$ENV{PATH}="$ENV{PATH}:$prefix/bin";

@order=qw(
	  glib
	  gtk+
	  imlib
	  ORBit
	  gnome-common
	  gnome-libs
	  gnome-objc
	  gnome-core
	  gnome-admin
	  gnome-network
	  gnome-utils
	  gnome-media
	  gedit
	  fnlib
	  ee
	  achtung
	  mc
	  gnumeric
	  pharmacy
);

@ignore=qw(
	   CVS
	   CVSROOT
	   Resurrection
	   atlas
	   audiofile
	   build
	   config
	   docs
	   giflib-3.0
	   gimp-data-min
	   gimp-data-extras
	   gnome-common
	   linux
);

@lsout = qx{ls -1};
@other = ();
$all = ();
$i = 0;
foreach my $s (@order, @ignore) {
  $all{$s} = $i++;
}

#for (my $i=0; $i<@lsout; $i++) {
#  chop $lsout[$i];
#  print $lsout[$i], "\n"; 
#}

foreach my $d (@lsout) {
  chop $d;
#  print $d, " ";
  next unless -d $d;
  if (defined $all{$d}) {
#    print "[present] ";
    next;
  }
  @other = (@other, $d);
#  print "<added>", "\n";
}
#print @other, "\n";

#open (ERRORLOG, "/tmp/update.errors") || die "Could not open error log: $!";

#foreach $name (@order) {
#    print "Updating $name...\n";
#    system "cvs -z3 update -d -P $name";
#    print "$name updated...\n";
#}
#
#print "All updates complete. Compile phase beginning...\n\n";

foreach $this (@order, @other) {
  next if -f "$this/.Installed";
  chdir $this;
  if (!-e "macros") {
    system "ln -s ../gnome-common/macros .";
    print "Warning: macros symlinked\n";
  }
  if (!-e "intl") {
    system "ln -s ../gnome-common/intl .";
    print "Warning: intl symlinked\n";
  }
  if (-l "libIDL") {
    system "ln -sf ../libIDL .";
    print "Warning: libIDL readjusted\n";
  }

  print "Configuring $this...\n";
  if (-f "Makefile") {
    system "make maintainer-clean";
  }
  system "aclocal -I macros -I $prefix/share/aclocal";
  if (system("./autogen.sh --prefix=$prefix --with-gtk=$gtk") == 0) {
    print "Compiling $this...\n";
    if (system("make && make install && /sbin/ldconfig") == 0) {
      print "Made $this...\n";
      system "touch .Installed";
    } else {
      exit 1 if (yesno("$this compile FAILED!! abort? "));
    }
  } else {
    exit 1 if (yesno("$this configure FAILED!! abort? "));
  }
  chdir "..";
}
=============================================

As You can see I had to do a lot of twiddling because in several subdirs "intl" 
and "macros" were missing (i decided to add them wherever missing).

mc configure script seems to completely ignore the --with-gtk= option; as a
result I had to add to "-I/opt/GNOME/include -I/opt/GNOME/lib/glib/include 
-I/opt/GNOME/lib/gnome-common/include -DATEXIT=atexit" to the Makefile
for the gtkedit subdir.

I found necessary the following patch in gedit:
diff -ur GNOME/gedit/src/gE_prefs_box.c GNOME.build/gedit/src/gE_prefs_box.c                                              
--- GNOME/gedit/src/gE_prefs_box.c      Fri Sep 18 11:00:00 1998                                                          
+++ GNOME.build/gedit/src/gE_prefs_box.c        Mon Sep 21 01:19:14 1998                                                  
@@ -84,7 +84,9 @@                                                                                                         
                                                                                                                          
 void cancel()                                                                                                            
 {                                                                                                                        
+#ifdef WITHOUT_GNOME                                                                                                     
   gtk_widget_destroy (GTK_WIDGET (pbox));                                                                                
+#endif                                                                                                                   
   g_free(prefs);                                                                                                         
   prefs = NULL;                                                                                                          
 }                                                                                                                        

I forced compilation of gnome-objc using:
diff -ur GNOME/gnome-objc/obgnome/obgnomeAppWin.m GNOME.build/gnome-objc/obgnome/obgnomeAppWin.m                          
--- GNOME/gnome-objc/obgnome/obgnomeAppWin.m    Fri Sep 18 11:46:07 1998                                                  
+++ GNOME.build/gnome-objc/obgnome/obgnomeAppWin.m      Mon Sep 21 00:50:18 1998                                          
@@ -57,7 +57,7 @@                                                                                                         
 {                                                                                                                        
   struct _GnomeUIBuilderData uibdata =                                                                                   
   {                                                                                                                      
-    GNOME_UISIGFUNC(obgnome_do_signal_connection),                                                                       
+    obgnome_do_signal_connection,                                                                                        
     self,                                                                                                                
     TRUE,                                                                                                                
     (GtkCallbackMarshal)obgtk_signal_relay,                                                                              
@@ -74,7 +74,7 @@                                                                                                         
 {                                                                                                                        
   struct _GnomeUIBuilderData uibdata =                                                                                   
   {                                                                                                                      
-    GNOME_UISIGFUNC(obgnome_do_signal_connection),                                                                       
+    obgnome_do_signal_connection,                                                                                        
     self,                                                                                                                
     TRUE,                                                                                                                
     (GtkCallbackMarshal)obgtk_signal_relay,                                                                              

Now I'm going to bed.

Best Regards

Mauro Condarelli



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]