unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* guile-1.8.0 on HP-UX 11.23/IA-64
@ 2006-06-07 16:06 Albert Chin
  2006-06-12 17:11 ` Steve Ellcey
  0 siblings, 1 reply; 4+ messages in thread
From: Albert Chin @ 2006-06-07 16:06 UTC (permalink / raw)


I tried compiling guile-1.8.0 on HP-UX 11.23/IA-64 with the HP-UX C
compiler. It compiles fine on HP-UX 11.23/PA-RISC. On IA-64, it fails:
 cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I/opt/TWWfsw/libtool15/include -I/opt/TWWfsw/libgmp42/include -D_REENTRANT -mthreads -g -c environments.c  -DPIC -o .libs/libguile_la-environments.o
cc: warning 901: unknown option: `-hreads': use +help for online documentation. 
"environments.c", line 146: warning #2940-D: missing return statement at end
          of non-void function "scm_environment_ref"
  }
  ^

"environments.c", line 253: warning #2940-D: missing return statement at end
          of non-void function "scm_environment_define"
  }
  ^

"environments.c", line 279: warning #2940-D: missing return statement at end
          of non-void function "scm_environment_undefine"
  }
  ^

"environments.c", line 309: warning #2940-D: missing return statement at end
          of non-void function "scm_environment_set_x"
  }
  ^

"environments.c", line 344: warning #2940-D: missing return statement at end
          of non-void function "scm_environment_cell"
  }
  ^

"environments.c", line 692: error #2042: operand types are incompatible ("void"
          and "SCM")
                : SCM_SET_CORE_ENVIRONMENT_OBSERVERS (env, rest);
                ^

1 error detected in the compilation of "environments.c".

Passing this through -E, the problematic line expands to:
          if ((((scm_t_bits) (0? (*(SCM*)0=(first)): first)) == ((scm_t_bits) (0 ? (*(SCM*)0=(observer)): observer))))
            {
               
              handling_weaks
                ? (scm_c_vector_set_x ((((struct core_environments_base *) ((((scm_t_bits) (0? (*(SCM*)0=((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(SCM*)0=((((env))))): (((env)))))))) [((1))]))): (((SCM *)((scm_t_cell *) (((scm_t_bits)(0? (*(SCM*)0=((((env))))): (((env)))))))) [((1))]))))))->weak_observers), 0, (rest)))
                : ((((struct core_environments_base *) ((((scm_t_bits) (0? (*(SCM*)0=((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(SCM*)0=((((env))))): (((env)))))))) [((1))]))): (((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(SCM*)0=((((env))))): (((env)))))))) [((1))]))))))->observers) = (rest));
              return;
            }

I then rebuilt with gcc-3.4.3 and got as far as the following:
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I/opt/TWWfsw/libtool15/include -I/opt/TWWfsw/libgmp42/include -D_REENTRANT -pthread -g -Wall -Wmissing-prototypes -Werror -c async.c  -DPIC -o .libs/libguile_la-async.o
async.c:139: warning: missing braces around initializer
async.c:139: warning: (near initialization for `async_mutex.m_short')
gmake[2]: *** [libguile_la-async.lo] Error 1

Passing this through -E, the problematic line expands to:
  static pthread_mutex_t async_mutex = { 0x36, 0, (0x80 | 0x1), 1, 1, 1, 1, 0, ((void *) 1L), 1, 0, 0, 0, -1, 0, 0, 2368, 0, 1, 1, 1, 1, 0, 0 };
and pthread_mutex_t on this platform is:
  struct pthread_mutex {
    short m_short[2];
    int   m_int;
    int   m_int1[4];
    int   m_pad;
    void *m_ptr;
    int   m_int2[2];
    int   m_int3[4];
    short m_short2[2];
    int   m_int4[5];
    int   m_int5[2];
  };

  typedef struct pthread_mutex pthread_mutex_t;

Rebuilding with --without-threads and GCC, the build errors out
further with:
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I/opt/TWWfsw/libtool15/include -I/opt/TWWfsw/libgmp42/include -g -Wall -Wmissing-prototypes -Werror -c continuations.c  -DPIC -o .libs/libguile_la-continuations.o
continuations.c: In function `scm_make_continuation':
continuations.c:147: error: structure has no member named `sc_ar_bsp'

This is the bigger problem. The getcontext() stuff for Linux/IA-64 is
not compatible with HP-UX/IA-64 (Ruby has problems with this as well).
We'll will to pay someone to solve this if anyone wants to attempt it.

BTW, HP-UX cc defines __ia64 and not __ia64__. GCC defines both __ia64
and __ia64__.

-- 
albert chin (china@thewrittenword.com)


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: guile-1.8.0 on HP-UX 11.23/IA-64
  2006-06-07 16:06 Albert Chin
@ 2006-06-12 17:11 ` Steve Ellcey
  0 siblings, 0 replies; 4+ messages in thread
From: Steve Ellcey @ 2006-06-12 17:11 UTC (permalink / raw)


| Rebuilding with --without-threads and GCC, the build errors out
| further with:
|  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I/opt/TWWfsw/libtool15/include -I/opt/TWWfsw/libgmp42/include -g -Wall -Wmissing-prototypes -Werror -c continuations.c  -DPIC -o .libs/libguile_la-continuations.o
| continuations.c: In function `scm_make_continuation':
| continuations.c:147: error: structure has no member named `sc_ar_bsp'
| 
| This is the bigger problem. The getcontext() stuff for Linux/IA-64 is
| not compatible with HP-UX/IA-64 (Ruby has problems with this as well).
| We'll will to pay someone to solve this if anyone wants to attempt it.

I looked at this once a while back, I replaced:

	continuation->ctx.uc_mcontext.sc_ar_bsp -
         	__libc_ia64_register_backing_store_base;

with

	uint64_t i;

	__uc_get_ar_bsp(continuation->ctx.uc_mcontext, &i);
	i - __libc_ia64_register_backing_store_base;

I may have run into other issues after this because it doesn't look like
I ever did a complete guile build for IA64 HP-UX.

Steve Ellcey
sje@cup.hp.com


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* guile-1.8.0 on HP-UX 11.23/IA-64
@ 2006-07-05 21:40 Albert Chin
  2006-07-06  8:44 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Albert Chin @ 2006-07-05 21:40 UTC (permalink / raw)


I tried compiling guile-1.8.0 on HP-UX 11.23/IA-64 with the HP-UX C
compiler. It compiles fine on HP-UX 11.23/PA-RISC. On IA-64, it fails:
 cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I/opt/TWWfsw/libtool15/include -I/opt/TWWfsw/libgmp42/include -D_REENTRANT -mthreads -g -c environments.c  -DPIC -o .libs/libguile_la-environments.o
cc: warning 901: unknown option: `-hreads': use +help for online documentation. 
"environments.c", line 146: warning #2940-D: missing return statement at end
          of non-void function "scm_environment_ref"
  }
  ^

"environments.c", line 253: warning #2940-D: missing return statement at end
          of non-void function "scm_environment_define"
  }
  ^

"environments.c", line 279: warning #2940-D: missing return statement at end
          of non-void function "scm_environment_undefine"
  }
  ^

"environments.c", line 309: warning #2940-D: missing return statement at end
          of non-void function "scm_environment_set_x"
  }
  ^

"environments.c", line 344: warning #2940-D: missing return statement at end
          of non-void function "scm_environment_cell"
  }
  ^

"environments.c", line 692: error #2042: operand types are incompatible ("void"
          and "SCM")
                : SCM_SET_CORE_ENVIRONMENT_OBSERVERS (env, rest);
                ^

1 error detected in the compilation of "environments.c".

Passing this through -E, the problematic line expands to:
          if ((((scm_t_bits) (0? (*(SCM*)0=(first)): first)) == ((scm_t_bits) (0 ? (*(SCM*)0=(observer)): observer))))
            {
               
              handling_weaks
                ? (scm_c_vector_set_x ((((struct core_environments_base *) ((((scm_t_bits) (0? (*(SCM*)0=((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(SCM*)0=((((env))))): (((env)))))))) [((1))]))): (((SCM *)((scm_t_cell *) (((scm_t_bits)(0? (*(SCM*)0=((((env))))): (((env)))))))) [((1))]))))))->weak_observers), 0, (rest)))
                : ((((struct core_environments_base *) ((((scm_t_bits) (0? (*(SCM*)0=((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(SCM*)0=((((env))))): (((env)))))))) [((1))]))): (((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(SCM*)0=((((env))))): (((env)))))))) [((1))]))))))->observers) = (rest));
              return;
            }

I then rebuilt with gcc-3.4.3 and got as far as the following:
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I/opt/TWWfsw/libtool15/include -I/opt/TWWfsw/libgmp42/include -D_REENTRANT -pthread -g -Wall -Wmissing-prototypes -Werror -c async.c  -DPIC -o .libs/libguile_la-async.o
async.c:139: warning: missing braces around initializer
async.c:139: warning: (near initialization for `async_mutex.m_short')
gmake[2]: *** [libguile_la-async.lo] Error 1

Passing this through -E, the problematic line expands to:
  static pthread_mutex_t async_mutex = { 0x36, 0, (0x80 | 0x1), 1, 1, 1, 1, 0, ((void *) 1L), 1, 0, 0, 0, -1, 0, 0, 2368, 0, 1, 1, 1, 1, 0, 0 };
and pthread_mutex_t on this platform is:
  struct pthread_mutex {
    short m_short[2];
    int   m_int;
    int   m_int1[4];
    int   m_pad;
    void *m_ptr;
    int   m_int2[2];
    int   m_int3[4];
    short m_short2[2];
    int   m_int4[5];
    int   m_int5[2];
  };

  typedef struct pthread_mutex pthread_mutex_t;

Rebuilding with --without-threads and GCC, the build errors out
further with:
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I/opt/TWWfsw/libtool15/include -I/opt/TWWfsw/libgmp42/include -g -Wall -Wmissing-prototypes -Werror -c continuations.c  -DPIC -o .libs/libguile_la-continuations.o
continuations.c: In function `scm_make_continuation':
continuations.c:147: error: structure has no member named `sc_ar_bsp'

This is the bigger problem. The getcontext() stuff for Linux/IA-64 is
not compatible with HP-UX/IA-64 (Ruby has problems with this as well).
We'll will to pay someone to solve this if anyone wants to attempt it.

BTW, HP-UX cc defines __ia64 and not __ia64__. GCC defines both __ia64
and __ia64__.

-- 
albert chin (china@thewrittenword.com)


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: guile-1.8.0 on HP-UX 11.23/IA-64
  2006-07-05 21:40 guile-1.8.0 on HP-UX 11.23/IA-64 Albert Chin
@ 2006-07-06  8:44 ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2006-07-06  8:44 UTC (permalink / raw)


Hi,

Albert Chin <guile-devel@mlists.thewrittenword.com> writes:

> I tried compiling guile-1.8.0 on HP-UX 11.23/IA-64 with the HP-UX C
> compiler. It compiles fine on HP-UX 11.23/PA-RISC. On IA-64, it fails:
>  cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I/opt/TWWfsw/libtool15/include -I/opt/TWWfsw/libgmp42/include -D_REENTRANT -mthreads -g -c environments.c  -DPIC -o .libs/libguile_la-environments.o
> cc: warning 901: unknown option: `-hreads': use +help for online documentation. 
> "environments.c", line 146: warning #2940-D: missing return statement at end
>           of non-void function "scm_environment_ref"
>   }

Actually, you don't need `environments.c' (it's currently unused and
undocumented).  So one easy way to work around this is to remove
`environments.c' from `Makefile.am', and then re-generate the makefile
(`make Makefile' should do the trick).

When using GCC, these missing return statements are not caught because
`scm_error_environment_unbound ()' and friends are declared with
attribute `noreturn'.  As for this:

> "environments.c", line 692: error #2042: operand types are incompatible ("void"
>           and "SCM")
>                 : SCM_SET_CORE_ENVIRONMENT_OBSERVERS (env, rest);
>                 ^

This could be rewritten with an `if' to avoid this problem, if need be.

Thanks,
Ludovic.


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-07-06  8:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-05 21:40 guile-1.8.0 on HP-UX 11.23/IA-64 Albert Chin
2006-07-06  8:44 ` Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2006-06-07 16:06 Albert Chin
2006-06-12 17:11 ` Steve Ellcey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).