GNU bug report logs - #7387
23.2; Emacs port to HP-UX ia64

Previous Next

Package: emacs;

Reported by: "Maguire, Andrew (GE Energy)" <andrew.maguire <at> ge.com>

Date: Fri, 12 Nov 2010 17:17:02 UTC

Severity: wishlist

Merged with 6811

Found in version 23.2

Fixed in version 27.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7387 in the body.
You can then email your comments to 7387 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7387; Package emacs. (Fri, 12 Nov 2010 17:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Maguire, Andrew (GE Energy)" <andrew.maguire <at> ge.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 12 Nov 2010 17:17:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Maguire, Andrew (GE Energy)" <andrew.maguire <at> ge.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 23.2; Emacs port to HP-UX ia64
Date: Fri, 12 Nov 2010 18:07:17 +0100
I have been attempting a port to Itanium HP-UX 11.23.
I have managed to change the configure etc. to successfully produce a
seemingly
valid bootstrap-emacs executable.
However, when it runs it immediately returns the error:

	emacs: Invalid function: run-hooks

This at a guess implies it is running the low level C functions but
appears to be
failing to find the Lisp function binding.
If anyone has any clues as to what could be wrong or things to try 
or where to look in the initialisation sequence please let me know.
The gdb environment on the machine unfortunately does not appear usable
at present, returning the unhelpful error:
	Error trying to get information from the dynamic linker.

I am also using gcc 4.3.3. I know that there is a port done by HP for
ia64 for version 22.3
but its configure program appeared to have been hacked to use HP's cc
compiler not gcc.

If I instead set CANNOT_DUMP 1, then I can get an undumped version that
opens an X Window,
but it suffers from initialisation issues, e.g. image-load-path is void
at start up
which is obviously wrong.

I noticed that XEmacs has a portable dump feature, which essentially
avoids rewriting
an executable file but instead stores the Lisp data to an xemacs.dmp
file next to the
executable. I managed to build xemacs 21.4.22 using it on the machine,
but I want FSF Emacs!

Thanks for any help,
Andrew Maguire


If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
u:/sw/WNT/x86/emacs/emacs-23.2/etc/DEBUG.


In GNU Emacs 23.2.1 (i386-mingw-nt5.1.2600)
 of 2010-05-08 on G41R2F1
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags
-Ic:/xpm/include'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENG
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <down-mouse-1> <mouse-1> <wheel-down> 
<wheel-up> <wheel-up> <wheel-down> <wheel-up> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <menu-bar> <help-menu> <about-emacs> <wheel-down> 
<wheel-up> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <menu-bar> <help-menu> 
<send-emacs-bug-report>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
byte-code: Beginning of buffer
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message ecomplete rfc822 mml easymenu mml-sec
password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231
rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc
time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1
hex-util hashcash mail-utils emacsbug tooltip ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win w32-vars
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process multi-tty emacs)




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7387; Package emacs. (Fri, 12 Nov 2010 19:07:01 GMT) Full text and rfc822 format available.

Message #8 received at 7387 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Maguire, Andrew (GE Energy)" <andrew.maguire <at> ge.com>
Cc: 7387 <at> debbugs.gnu.org
Subject: Re: bug#7387: 23.2; Emacs port to HP-UX ia64
Date: Fri, 12 Nov 2010 21:11:38 +0200
> Date: Fri, 12 Nov 2010 18:07:17 +0100
> From: "Maguire, Andrew (GE Energy)" <andrew.maguire <at> ge.com>
> Cc: 
> 
> If I instead set CANNOT_DUMP 1, then I can get an undumped version
> that opens an X Window, but it suffers from initialisation issues,
> e.g. image-load-path is void at start up which is obviously wrong.

Does it work, with CANNOT_DUMP set, to invoke Emacs like this:

  emacs -l loadup

?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7387; Package emacs. (Sat, 13 Nov 2010 05:41:02 GMT) Full text and rfc822 format available.

Message #11 received at 7387 <at> debbugs.gnu.org (full text, mbox):

From: Dan Nicolaescu <dann <at> gnu.org>
To: "Maguire\, Andrew \(GE Energy\)" <andrew.maguire <at> ge.com>
Cc: 7387 <at> debbugs.gnu.org
Subject: Re: bug#7387: 23.2; Emacs port to HP-UX ia64
Date: Sat, 13 Nov 2010 00:45:01 -0500
"Maguire, Andrew (GE Energy)" <andrew.maguire <at> ge.com> writes:

> I have been attempting a port to Itanium HP-UX 11.23.
> I have managed to change the configure etc. to successfully produce a
> seemingly
> valid bootstrap-emacs executable.
> However, when it runs it immediately returns the error:
>
> 	emacs: Invalid function: run-hooks
>
> This at a guess implies it is running the low level C functions but
> appears to be
> failing to find the Lisp function binding.
> If anyone has any clues as to what could be wrong or things to try 
> or where to look in the initialisation sequence please let me know.
> The gdb environment on the machine unfortunately does not appear usable
> at present, returning the unhelpful error:
> 	Error trying to get information from the dynamic linker.

Did you use unexelf.c for dumping?  

> I am also using gcc 4.3.3. I know that there is a port done by HP for
> ia64 for version 22.3
> but its configure program appeared to have been hacked to use HP's cc
> compiler not gcc.

What kind of hacks?  Changing the compiler should not be very important.

Can you please try the trunk?  There have been some fixes for HPUX
specific problems.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7387; Package emacs. (Mon, 15 Nov 2010 13:26:02 GMT) Full text and rfc822 format available.

Message #14 received at 7387 <at> debbugs.gnu.org (full text, mbox):

From: "Maguire, Andrew (GE Energy)" <andrew.maguire <at> ge.com>
To: "Dan Nicolaescu" <dann <at> gnu.org>
Cc: 7387 <at> debbugs.gnu.org
Subject: RE: bug#7387: 23.2; Emacs port to HP-UX ia64
Date: Mon, 15 Nov 2010 14:29:39 +0100
Yes I am using unexelf.c

I agree that changing the compiler should not be important, although it
is in the bit of code that atempts to rewrite an ELF binary!!!

I am attempting to down the dev code. Will take a while as I have to
learn to use Bazaar.
I am downloading emacs-23.2 directory by mistake, but will let that
finish and download the latest "trunk".
I cannot spend long on this unfortunately, but will see what I can
report back.

I downloaded the source of the HP managed port which appeared to also
have an Itanium binary for 22.3 from
	http://hpux.connect.org.uk/hppd/hpux/Editors/emacs-22.3/
I then compared that with the source tree from GNU.
There were a few changes but the configure program had been modified
with 
an "if HP-UX" block of code right near the start of the script. As I
said,
it looked a bit of a hack. 
Upshot was I managed to get as far as I described below after
integrating the few changes the above appeared to have.

I also did a google search and found an patch for HPUX and 23.2 by Peter
O'Gorman.
I have applied that.

Will get back if I get anywhere.
Thanks
Andrew
	
-----Original Message-----
From: Dan Nicolaescu [mailto:dann <at> gnu.org] 
Sent: 13 November 2010 05:45
To: Maguire, Andrew (GE Energy)
Cc: 7387 <at> debbugs.gnu.org
Subject: Re: bug#7387: 23.2; Emacs port to HP-UX ia64

"Maguire, Andrew (GE Energy)" <andrew.maguire <at> ge.com> writes:

> I have been attempting a port to Itanium HP-UX 11.23.
> I have managed to change the configure etc. to successfully produce a
> seemingly
> valid bootstrap-emacs executable.
> However, when it runs it immediately returns the error:
>
> 	emacs: Invalid function: run-hooks
>
> This at a guess implies it is running the low level C functions but
> appears to be
> failing to find the Lisp function binding.
> If anyone has any clues as to what could be wrong or things to try 
> or where to look in the initialisation sequence please let me know.
> The gdb environment on the machine unfortunately does not appear
usable
> at present, returning the unhelpful error:
> 	Error trying to get information from the dynamic linker.

Did you use unexelf.c for dumping?  

> I am also using gcc 4.3.3. I know that there is a port done by HP for
> ia64 for version 22.3
> but its configure program appeared to have been hacked to use HP's cc
> compiler not gcc.

What kind of hacks?  Changing the compiler should not be very important.

Can you please try the trunk?  There have been some fixes for HPUX
specific problems.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7387; Package emacs. (Mon, 15 Nov 2010 20:09:02 GMT) Full text and rfc822 format available.

Message #17 received at 7387 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: "Maguire\, Andrew \(GE Energy\)" <andrew.maguire <at> ge.com>
Cc: Dan Nicolaescu <dann <at> gnu.org>, 7387 <at> debbugs.gnu.org
Subject: Re: bug#7387: 23.2; Emacs port to HP-UX ia64
Date: Mon, 15 Nov 2010 15:12:52 -0500
There might be something relevant in here:

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6811

"Attached is a patch that allows us to build emacs-23.2 on our HP-UX
systems (10.20, 11.00 and 11.11 PA-RISC and 11.23, 11.31 both PA and
IA64)."




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7387; Package emacs. (Mon, 15 Nov 2010 22:19:02 GMT) Full text and rfc822 format available.

Message #20 received at 7387 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Maguire\, Andrew \(GE Energy\)" <andrew.maguire <at> ge.com>
Cc: 7387 <at> debbugs.gnu.org
Subject: Re: bug#7387: 23.2; Emacs port to HP-UX ia64
Date: Fri, 12 Nov 2010 16:28:16 -0500
> I have been attempting a port to Itanium HP-UX 11.23.

The configuration files for different OSes and hardware have been
changed significantly (tho not completely) in the trunk (to become
Emacs-24), so you may want to work directly in that version instead
(otherwise someone may additionally have to figure out how to port the
patch you come up with for Emacs-23)

> I have managed to change the configure etc. to successfully produce a
> seemingly
> valid bootstrap-emacs executable.
> However, when it runs it immediately returns the error:

> 	emacs: Invalid function: run-hooks

Placing a breakpoint on Fsignal may help you figure out what's going on.
[ Oh, I saw later that GDB is not functional for you.  Hmm... ]

> This at a guess implies it is running the low level C functions but
> appears to be
> failing to find the Lisp function binding.

Everything's possible, but run-hooks is a C function, not a Lisp
function; and some C code runs Frun_hooks via an indirection through the
"run-hooks" symbol itself found via the Vrun_hooks C-only variable.
So it's quite possible (my gut says "likely") that it's still a C-level
problem.

IOW I think the issue is that for some reason Vrun_hooks was set to the
"run-hooks" symbol before the Frun_hooks function was defined (via the
defsubr call in syms_of_eval).  As it turns out Vrun_hooks is also set
in syms_of_eval.

So that would imply that the above error would happen some time between
the
    Vrun_hooks = intern_c_string ("run-hooks");
and
    defsubr (&Srun_hooks);

in syms_of_eval.  Nothing there jumps at me as a likely culprit, so
maybe the issue is that Vrun_hooks gets set elsewhere, or that
DEFUN+defsubr don't actually do their job as expected.  E.g. maybe the
data section that holds the Lisp_Subr structures gets wiped by the dump?

> I noticed that XEmacs has a portable dump feature, which essentially
> avoids rewriting an executable file but instead stores the Lisp data
> to an xemacs.dmp file next to the executable.

Yes, quite handy, isn't it?

> I managed to build XEmacs 21.4.22 using it on the machine, but I want
> FSF Emacs!

Of course, don't we all?


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7387; Package emacs. (Tue, 16 Nov 2010 10:59:01 GMT) Full text and rfc822 format available.

Message #23 received at 7387 <at> debbugs.gnu.org (full text, mbox):

From: "Maguire, Andrew (GE Energy)" <andrew.maguire <at> ge.com>
To: "Glenn Morris" <rgm <at> gnu.org>,
	<pogma <at> thewrittenword.com>
Cc: Dan Nicolaescu <dann <at> gnu.org>, 7387 <at> debbugs.gnu.org
Subject: RE: bug#7387: 23.2; Emacs port to HP-UX ia64
Date: Tue, 16 Nov 2010 12:03:17 +0100
Thanks, I did find Peter's patch via a search and was already using
that.
However, this patch sets CANNOT_DUMP=1 on the ia64 system.
Although this allowed me to be start up Emacs, its initialisation had a
flaw whereby image-load-path was void
when it should have been defined, I did not spend any time investigating
why.

So, I am trying to get a dumped Emacs working on ia64.

Peter, can I ask which C compiler are you using on your IA64 system?
I am using gcc 4.3.3.

-----Original Message-----
From: Glenn Morris [mailto:rgm <at> gnu.org] 
Sent: 15 November 2010 20:13
To: Maguire, Andrew (GE Energy)
Cc: Dan Nicolaescu; 7387 <at> debbugs.gnu.org
Subject: Re: bug#7387: 23.2; Emacs port to HP-UX ia64


There might be something relevant in here:

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6811

"Attached is a patch that allows us to build emacs-23.2 on our HP-UX
systems (10.20, 11.00 and 11.11 PA-RISC and 11.23, 11.31 both PA and
IA64)."




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7387; Package emacs. (Tue, 16 Nov 2010 14:52:01 GMT) Full text and rfc822 format available.

Message #26 received at 7387 <at> debbugs.gnu.org (full text, mbox):

From: "Peter O'Gorman" <pogma <at> thewrittenword.com>
To: "Maguire, Andrew (GE Energy)" <andrew.maguire <at> ge.com>
Cc: Glenn Morris <rgm <at> gnu.org>, 7387 <at> debbugs.gnu.org,
	Dan Nicolaescu <dann <at> gnu.org>
Subject: Re: bug#7387: 23.2; Emacs port to HP-UX ia64
Date: Tue, 16 Nov 2010 08:55:24 -0600
On Tue, Nov 16, 2010 at 12:03:17PM +0100, Maguire, Andrew (GE Energy) wrote:
> Thanks, I did find Peter's patch via a search and was already using
> that.
> However, this patch sets CANNOT_DUMP=1 on the ia64 system.
> Although this allowed me to be start up Emacs, its initialisation had a
> flaw whereby image-load-path was void
> when it should have been defined, I did not spend any time investigating
> why.
> 
> So, I am trying to get a dumped Emacs working on ia64.

That would be great!

> 
> Peter, can I ask which C compiler are you using on your IA64 system?
> I am using gcc 4.3.3.

Looking at our build recipie and its comments:
CC=cc (cc: HP C/aC++ B3910B A.06.25.01)
CFLAGS="-z +O1 -Wp,-H,200000" (-H 20000 to avoid macro too large error in
dbusbind.c)
CPP=/usr/ccs/lbin/cpp (because cc -E doesn't create a working Makefile).

As I mentioned to Dan in an email yesterday, it may be worth looking at 
what the hpux porting folks did:
http://hpux.connect.org.uk/hppd/cgi-bin/wwwtar?/hpux/Editors/emacs-22.3/emacs-22.3-src-11.11.tar.gz+emacs-22.3/HPUX.Install+text

Hope this helps,
Peter
-- 
Peter O'Gorman
pogma <at> thewrittenword.com




Merged 6811 7387. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 06 Feb 2013 20:33:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 04 Oct 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 197 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.