Errors compiling Gimp 1.1.17 on Solaris 8.

2000-02-21 Thread Ludovic Poitou

Hi there,

I've had trouble compiling gimp 1.1.17 on Solaris 8 with the native
compiler (Workshop 5.0).
Here's the list of problem :

In plug-ins/common/ both gauss_iir.c and gauss_rle.c fail compiling
because of G_MAXDOUBLE.

cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../..
-I/opt/sfw/lib/glib/include -I/opt/sfw/include
-I/usr2/gimp/include -DLOCALEDIR=\""/usr2/gimp/lib/locale"\"
-I/usr/sfw/include -R/usr/sfw/lib -c gauss_iir.c
"gauss_iir.c", line 399: conversion to float is out of range
"gauss_iir.c", line 399: warning: conversion to float is out of range
"gauss_iir.c", line 541: warning: semantics of "/" change in ANSI C; use
explicit cast
cc: acomp failed for gauss_iir.c
*** Error code 2
make: Fatal error: Command failed for target `gauss_iir.o'

gauss_iir.c line 399:
  spinbutton = gimp_spin_button_new (&adj,
 bvals.radius, 1.0, G_MAXDOUBLE,
1.0, 5.0,
 0, 1, 2);

/opt/sfw/lib/glib/include/glibconfig.h
#define G_MAXDOUBLE DBL_MAX

/usr/include/float.h:#defineDBL_MAX 1.7976931348623157E+308

---
In app, perspective_tool.c, rotate_tool.c, scale_tool.c and shear_tool.c
have the same error :

cc -DHAVE_CONFIG_H -I. -I. -I.. -I..
-I../intl  -I/opt/sfw/lib/glib/include
-I/opt/sfw/include   -I/usr2/gimp/include
-DLIBDIR=\""/usr2/gimp/lib/gimp/1.1"\"
-DLOCALEDIR=\""/usr2/gimp/lib/locale"\" -DREGEX_MALLOC
-I/usr/sfw/include -R/usr/sfw/lib -c perspective_tool.c
"perspective_tool.c", line 302: warning: argument #4 is incompatible
with prototype:
prototype: pointer to function() returning void :
"./gimpprogress.h", line 36
argument : pointer to void
"perspective_tool.c", line 306: operands have incompatible types:
 pointer to function(int, int, int, pointer to void) returning
void ":" pointer to void
cc: acomp failed for perspective_tool.c
*** Error code 2
make: Fatal error: Command failed for target `perspective_tool.o'

Line 306 :
  ret = transform_core_do (gimage, drawable, float_tiles,
  interpolation, matrix,
  progress ? progress_update_and_flush : NULL,
  progress);

NULL is pointer to void and not a progress_func_t.

The following change fix the compilation problem:
  ret = transform_core_do (gimage, drawable, float_tiles,
   interpolation, matrix,
           progress ? progress_update_and_flush :
(progress_func_t)NULL,
   progress);

Regards and happy gimping.

Ludovic.



--
Ludovic Poitou
Sun Microsystems Inc.
iPlanet E-Commerce Solutions - Directory Group - Grenoble - France





Crash in Gimp 1.1.7 on Solaris 8.

2000-02-22 Thread Ludovic Poitou
set(dest, *color, w);
 break;
   case 2:
 shortc = ((guint16 *)color)[0];
 shortd = (guint16 *)dest;
 while (w--)
 {
   *shortd = shortc;
   shortd++;
 }
 break;
   case 3:
 c0 = color[0];
 c1 = color[1];
 c2 = color[2];
 while (w--)
 {
   dest[0] = c0;
   dest[1] = c1;
   dest[2] = c2;
   dest += 3;
 }
 break;
   case 4:
 longc = ((guint32 *)color)[0];   <<<< Crash here !
 longd = (guint32 *)dest;
 while (w--)
 {
   *longd = longc;
   longd++;
 }
 break;
   default:
   {
 int b;
 while (w--)
 {
   for (b = 0; b < bytes; b++)
 dest[b] = color[b];

   dest += bytes;
 }
   }
  }
}


--
Ludovic Poitou
Sun Microsystems Inc.
iPlanet E-Commerce Solutions - Directory Group - Grenoble - France





Re: Crash in Gimp 1.1.7 on Solaris 8.

2000-02-23 Thread Ludovic Poitou

Tim Mooney wrote:

> In regard to: Crash in Gimp 1.1.7 on Solaris 8., Ludovic Poitou said (at...:
>
> >signal BUS (invalid address alignment) in color_pixels at 0x177858
> >color_pixels+0x110: ld  [%l0], %i1
>
> You don't say what architecture you're running on, but Solaris 7 or later on
> an Ultra would be a LP64 (i.e. 64 bit) OS, so an invalid address alignment
> would be indicative of incorrect alignment of a pointer.  I'm not certain,
> but odds are good that pointers in Solaris 8 must be aligned on 8-byte
> boundaries, as opposed to ints which could be aligned on 4-byte boundaries.
>

SunOS bondi 5.8 Generic sun4u sparc SUNW,Ultra-5_10
UltraSPARC-IIi

But I haven't compiled with the 64 bit flag on !

A simple program like this :
main(){
printf("%d\n", sizeof(unsigned char *));
}

returns 4 !

Ludovic.

>
> >  register unsigned char c0, c1, c2;
> >  register guint32 *longd, longc;
> >  register guint16 *shortd, shortc;
>
> I can't tell by the code what the intent is, but these definitions have
> longd as a pointer (an 8-byte quantity on LP64 machines) while longc is
> an unsigned 32-bit quantity (*not* a pointer).  Ditto for shortd and shortc.
>
> >  switch (bytes)
> >  {
> >   case 1:
> > memset(dest, *color, w);
> > break;
> >   case 2:
> > shortc = ((guint16 *)color)[0];
>
> This is probably also a problem here -- shortc isn't big enough to hold
> an address.
>
> > shortd = (guint16 *)dest;
> > while (w--)
> > {
> >   *shortd = shortc;
> >   shortd++;
> > }
> > break;
> >   case 3:
> > c0 = color[0];
> > c1 = color[1];
> > c2 = color[2];
> > while (w--)
> > {
> >   dest[0] = c0;
> >   dest[1] = c1;
> >   dest[2] = c2;
> >   dest += 3;
> > }
> > break;
> >   case 4:
> > longc = ((guint32 *)color)[0];   <<<< Crash here !
>
> longc is a 32 bit quantity, which isn't big enough to hold an address on
> LP64 machines.   That's probably why you're getting the crash.  I bet I
> would get the same result (or at least an "unaligned access" warning) on
> my Tru64 Unix box.
>
> > longd = (guint32 *)dest;
> > while (w--)
> > {
> >   *longd = longc;
> >   longd++;
> > }
> > break;
> >   default:
> >   {
> > int b;
> > while (w--)
> > {
> >   for (b = 0; b < bytes; b++)
> > dest[b] = color[b];
> >
> >   dest += bytes;
> > }
> >   }
> >  }
> >}
>
> I'm not sure what the right fix is, being I haven't looked long enough at
> the code to decipher what's going on.  The problem is almost certainly a 32 bit
> vs. 64 bit issue, though.
>
> Tim
> --
> Tim Mooney  [EMAIL PROTECTED]
> Information Technology Services (701) 231-1076 (Voice)
> Room 242-J1, IACC Building  (701) 231-8541 (Fax)
> North Dakota State University, Fargo, ND 58105-5164



Re: Crash in Gimp 1.1.7 on Solaris 8.

2000-02-29 Thread Ludovic Poitou

[EMAIL PROTECTED] wrote:

> On 23 Feb, Ludovic Poitou wrote:
>
> > SunOS bondi 5.8 Generic sun4u sparc SUNW,Ultra-5_10
> > UltraSPARC-IIi
>
> > But I haven't compiled with the 64 bit flag on !
>
> > A simple program like this :
> > main(){
> > printf("%d\n", sizeof(unsigned char *));
> > }
>
>  Do the plugins work for you? We've got dozens of problems with
>  GIMP on 64bit architectures not using gcc for compilation.
>

I tried several plugins and they all work.

Ludovic.

>
> --
>
> Servus,
>Daniel

--
Ludovic Poitou
Sun Microsystems Inc.
iPlanet E-Commerce Solutions - Directory Group - Grenoble - France





Pb with the display of the Gimp Toolbox (1.1.28)

2000-10-27 Thread Ludovic Poitou

I'm facing a pb with the way the toolbox is displayed. I've had this pb
with the 1.1 versions, and it's still there (1.1.28).

The 2 pb are the following :
There's always an empty column on the rights of the icons in the
toolbox.
The Gradient image in the Brush/Pattern/Gradient button, hides part of
the bottom of the button.

This is on Solaris 8, CDE.

But as images worth much more than talks, the screenshots are here :
http://ludovicp.multimania.com/Snapshots/gimptoolbox.jpg

Thanks.

Ludovic.

--
Ludovic Poitou
Sun Microsystems Inc.
iPlanet E-Commerce Solutions - Directory Group - Grenoble - France






Re: Pb with the display of the Gimp Toolbox (1.1.28)

2000-10-30 Thread Ludovic Poitou

Sven Neumann wrote:

> Ludovic Poitou <[EMAIL PROTECTED]> writes:
>
> > I'm facing a pb with the way the toolbox is displayed. I've had this pb
> > with the 1.1 versions, and it's still there (1.1.28).
>
> Just to make sure: Have you tried to remove the file
> ~/.gimp-1.1/sessionrc? Please report back if this helps or if
> the problem continues to exist.
>

Yes, I tried to get rid of the whole .gimp-1.1 directory.
My sessionrc only contains the last tip shown

bondi> more sessionrc
# GIMP sessionrc
# This file takes session-specific info (that is info,
# you want to keep between two gimp-sessions). You are
# not supposed to edit it manually, but of course you
# can do. This file will be entirely rewritten every time
# you quit the gimp. If this file isn't found, defaults
# are used.

(last-tip-shown 10)

Ludo

>
> Salut, Sven

--
Ludovic Poitou
Sun Microsystems Inc.
iPlanet E-Commerce Solutions - Directory Group - Grenoble - France






Re: test program for waitpid/sigchld problems

2000-11-08 Thread Ludovic Poitou

Here's the results I got with your test program on Solaris 8, OSF1, HP-UX, AIX.

Ludovic.

Results on Solaris 8:

bondi> sigtest
installing signal handler...
forking...
waiting for child 9253 to exit...
child 9253 has exited
  sig_pid = 9253
  sig_status = 25600
  main_pid = -1
  main_status = 
sigchld handler was called before waitpid (no status)
bondi>

Results on OSF1- V4.0 True64 - alpha

centauri> sigtest
installing signal handler...
forking...
waiting for child 26517 to exit...
child 26517 has exited
  sig_pid = 26517
  sig_status = 25600
  main_pid = -1
  main_status = 
sigchld handler was called before waitpid (no status)

Results on HP-UX B.11.00 E 9000/715

gorzon> sigtest
installing signal handler...
forking...
waiting for child 26769 to exit...
child 26769 has exited
  sig_pid = 26769
  sig_status = 25600
  main_pid = -1
  main_status = 
sigchld handler was called before waitpid (no status)

Results on AIX 3.4

aladin> sigtest
installing signal handler...
forking...
waiting for child 15236 to exit...
child 15236 has exited
  sig_pid = 15236
  sig_status = 25600
  main_pid = -1
  main_status = 
sigchld handler was called before waitpid (no status)
aladin>

Raphael Quinet wrote:

> Included below is a small test program that checks how the OS behaves
> when a child process exits while the parent is blocking on waitpid()
> and has a SIGCHLD handler installed (which also calls waitpid, and
> thus could steal the status if the signal handler is called before
> the first waitpid returns).
>
> Currently, I only tested this under Linux (2.2.13, 2.2.14), Solaris
> 2.6 and IRIX 6.5.  Linux and IRIX give priority to waitpid(), Solaris
> gives priority to the signal handler.  That's why several plug-ins did
> not work under Solaris.
>
> If you are running another UNIX-like system (*BSD, HP-UX, AIX, etc.),
> it would be nice if you could compile and run the following code and
> report what it says.  The code does not depend on glib, gtk or any
> other libraries, so it should be easy to compile it on any system.
>
> -Raphael
>
> #include 
> #include 
> #include 
> #include 
>
> int pid;
> int sig_pid = ;
> int sig_status = ;
> int main_pid = ;
> int main_status = ;
>
> static void
> sigchld_handler (int signum)
> {
>   sig_pid = waitpid (pid, &sig_status, WNOHANG);
> }
>
> int
> main (int argc, char *argv[])
> {
>   int ret;
>   struct sigaction sa;
>   struct sigaction osa;
>
>   printf ("installing signal handler...\n");
>   sa.sa_handler = sigchld_handler;
>   sigfillset (&sa.sa_mask);
>   sa.sa_flags = SA_RESTART;
>   ret = sigaction (SIGCHLD, &sa, &osa);
>   if (ret < 0)
> {
>   printf ("cannot set signal handler, bye!\n");
>   exit (-1);
> }
>
>   printf ("forking...\n");
>   pid = fork ();
>   if (pid == 0)
> {
>   sleep (1);
>   _exit (100);
> }
>
>   printf ("waiting for child %d to exit...\n", pid);
>   main_pid = waitpid (pid, &main_status, 0);
>
>   printf ("child %d has exited\n", pid);
>   printf ("  sig_pid = %d\n", sig_pid);
>   printf ("  sig_status = %d\n", sig_status);
>   printf ("  main_pid = %d\n", main_pid);
>   printf ("  main_status = %d\n", main_status);
>   if (sig_pid < 0)
> {
>   if (main_pid < 0)
>     printf ("no child status (fork failed?)\n");
>   else
> printf ("waitpid got the status before sigchld handler was called\n");
> }
>   else
> {
>   if (main_pid < 0)
> printf ("sigchld handler was called before waitpid (no status)\n");
>   else
> printf ("you seem to have a very interesting OS...\n");
> }
> }

--
Ludovic Poitou
Sun Microsystems Inc.
iPlanet E-Commerce Solutions - Directory Group - Grenoble - France