Subject: FVWM: Compile problems under hpux

From: Robert Granat <[email-masked]>
Date: Thu, 11 Sep 1997 11:07:52 -0700 (PDT)

Hi,

I'm having some problems compiling fvwm2.0.46 on a hpux 10.20 system.
I was wondering if anyone had any ideas about what it going wrong.

I'll admit up front that I'm new to both fvwm and hpux...

xmkmf and "make Makefiles" don't seem to do anything obviously wrong,
but when I try the actual make I get mounds of errors.

making all in ./libs...
        cc +O3 +OS -Wp,-H200000   -I. -I/libs  -I/usr/X11R5/include  -DSYSV   -DSHAPE -DACTIVEDOWN_BTNS -DINACTIVE_BTNS -DMINI_ICONS -DVECTOR_BUTTONS -DPIXMAP_BUTTONS -DGRADIENT_BUTTONS -DMULTISTYLE -DEXTENDED_TITLESTYLE -DBORDERSTYLE -DUSEDECOR -DWINDOWSHADE -DXPM  -c Picture.c
cc: warning 450: Unrecognized option +OS.
cpp: "Picture.c", line 33: error 4036: Can't open include file 'X11/xpm.h'.

xpm.h obviously doesn't exist (where fvwm expects it to, at least).  Is this
something that I should go pester the sysadmins about or is it normal for 
hpux 10.20?  Is there a possible workaround?

Also, I see things like:

making all in ./fvwm...
        rm -f builtins.o
        cc -c +O3 +OS -Wp,-H200000   -I. -I../libs  -I/usr/X11R5/include  -DSYSV   -DSHAPE -DACTIVEDOWN_BTNS -DINACTIVE_BTNS -DMINI_ICONS -DVECTOR_BUTTONS -DPIXMAP_BUTTONS -DGRADIENT_BUTTONS -DMULTISTYLE -DEXTENDED_TITLESTYLE -DBORDERSTYLE -DUSEDECOR -DWINDOWSHADE -DXPM  -DFVWM_ICONDIR=\"/usr/X11R5/include/X11/bitmaps\:/usr/X11R5/include/X11/pixmaps\"  -DFVWMDIR=\"/usr/X11R5/lib/X11/fvwm2\"  -DFVWMRC=\".fvwm2rc\" builtins.c
cc: warning 450: Unrecognized option +OS.
cc: "../libs/fvwmlib.h", line 19: warning 5: "const" will become a keyword.
cc: "../libs/fvwmlib.h", line 19: error 1000: Unexpected symbol: "char".
cc: error 2017: Cannot recover from earlier errors, terminating.
*** Error exit code 1

Stop.
making all in ./modules/FvwmAudio...
Make: Don't know how to make ../../libs/libfvwm2.a.  Stop.
making all in ./modules/FvwmAuto...
Make: Don't know how to make ../../libs/libfvwm2.a.  Stop.
making all in ./modules/FvwmBacker...
Make: Don't know how to make ../../libs/libfvwm2.a.  Stop.

After this it is just more of the same for the different modules.

Any suggestions will be greatly appreciated.

Thanks in Advance,
Robert Granat
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Michael Tiefenback <[email-masked]>
Date: Fri, 12 Sep 1997 08:45:15 -0400 (EDT)

I was able to compile on HP-UX 9.xx by grabbing the xpm libs, compiling
them in a local directory for use, and then giving the path as part of the
LOCAL_LDFLAGS environmental pointer for the linker.  My "gccopts"
single-line script (I don't use this often enough to remember it without
such help) is:

setenv LOCAL_LDFLAGS "-I/usr/user2/tiefen/lib -L/usr/lib/X11R5
-L/usr/user4/tiefen/Xpm/lib -L/usr/user2/tiefen/lib"

(The mailer has split the command onto 2 lines, please note.)  Any other
and better suggestions from others I will probably incorporate in place of
this.  By the way, dynamically linked things such as this remember where
the lib is.  I don't know enough about how these things are found by the
loader to understand this, but when I compiled fvwm2 on another system
with a different xpm path and copied the binaries over to the target
system, the loader couldn't find the xpm lib in my directory hierarchy.  I
had to do a compile and link locally before it could get it correctly.
However, I couldn't find an explicit path to the xpm lib in either
executable with "strings".  To me, it is a mystery....

Michael Tiefenback

---

From: aesop <[email-masked]>
Date: Fri, 12 Sep 1997 19:21:52 -0400 (EDT)

> hpux 10.20?  Is there a possible workaround?

1) You'll need to get the Xpm library.  Try ftp.x.org or sunsite.unc.edu
(or a mirror)  Once you get it compiled, you may wish to just install it
in $HOME/lib and then add -L$HOME/lib to the compiler define in Fvwm.tmpl.

You'll probably use the Xpm library many more times for other programs
(such as xscreensaver, asclock, etc.)

2) Check the compiler you're using.  If it came bundled with HPUX, it's
not ansi and may give you are hard time.  If you have a development
machine I'd suggest investigating and giving that compiler a try instead.

		OR
Take a deep breath - and get gcc.  The gcc compiler will make your life
much easier for many projects.  Unfortunately, getting gcc compiled will
take a lot of patience.  I'm including an attachment from dejanews about
how to compile gcc on HPUX 10.20 .  I took this route.  BTW, anyone using
HP-UX 10.20, your sed is broken :)  -- Check the attachment.

3) If your still getting errors, search dejanews.  There's been a fairly
good flurry concerning HPUX 10.20 and compiling in general.

Eric
  
> Any suggestions will be greatly appreciated.

Dogbert: Has your electronic mail system made you more efficient?
Dilbert: In a way... Now I'm getting ignored at the speed of light.
						-- Scott Adams
<HTML>
<HEAD><TITLE>Deja News Newsgroup Article</TITLE></HEAD>

<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#52188c" alink="#ff0000">

<table width=490 cellpadding=0 cellspacing=0 border=0>
<tr valign=center><td align=center colspan=6>
<a href="http://web3.dejanews.com/"><img src="http://web3.dejanews.com/gifs/nav_upper.gif" alt="Deja News" height=36 width=430 border=0></a><a href="http://web3.dejanews.com/"><img src="http://web3.dejanews.com/gifs/home2.gif" alt="Home" height=36 width=60 border=0></a>
</td></tr>
<tr align=center>
<td nowrap><font size=2><a href="http://web3.dejanews.com/home_qs.shtml">Quick Search</a>&nbsp;</font></td>
<td nowrap><font size=2>&nbsp;<a href="http://web3.dejanews.com/home_ps.shtml">Power Search</a>&nbsp;</font></td>
<td nowrap><font size=2>&nbsp;<a href="http://web3.dejanews.com/home_sf.shtml">Search Filter</a>&nbsp;</font></td>
<td nowrap><font size=2>&nbsp;<a href="http://web3.dejanews.com/home_if.shtml">Interest Finder</a>&nbsp;</font></td>
<td nowrap><font size=2>&nbsp;<a href="http://web3.dejanews.com/home_bg.shtml">Browse Groups</a>&nbsp;</font></td>
<td nowrap><font size=2>&nbsp;<a href="http://postnews.dejanews.com/post.xp">Post Message</a></font></td>
</tr>
<tr><td colspan=6><hr></td></tr>
</table>

<A HREF="http://gtp2.dejanews.com/gtc?id=-229.0&tm=874104388.121634&site=dn&location=gnu.gcc.help&keywords=compiling%20gcc%20on%20hpux%2010.20&cr=%7c%7c%7c%7c%7c%7c%7c%7c">
<IMG ALIGN=MIDDLE HEIGHT=60 WIDTH=468 SRC="http://web2.dejanews.com/ads/uswest_3.gif" ALT="Please visit our sponsor" border=1></A><BR><br>
<table cellspacing=0 cellpadding=2 width=470 border=0>
<tr><td bgcolor="#cccccc"><font face="arial,helvetica" size=4><b>&nbsp;Article 21 of 25</b></font></td>
<td bgcolor="#cccccc" align=right><a href="getdoc.xp?recnum=8586922&server=db97p4&CONTEXT=874103825.621937221&hitnum=20&fmt=pre">Text Only<img src="http://web3.dejanews.com/gifs/text.gif" align=absmiddle width=22 height=20 border=0 alt=""></a>&nbsp;&nbsp;&nbsp;<a href="http://web3.dejanews.com/help/help_art.shtml">Help<img src="http://web3.dejanews.com/gifs/qm.gif" width=22 height=20 border=0 align=absmiddle alt="?"></a></td></tr>
</table><table cellspacing=0 cellpadding=2 border=0><tr align=center>
<td><A HREF="http://xp5.dejanews.com/getdoc.xp?recnum=9638602&server=db97p4&CONTEXT=874103825.621937221&hitnum=19"><IMG ALT="[Previous Article]" BORDER=0 SRC="http://web3.dejanews.com/gifs/prev.gif" width=31 height=25 hspace=6><br><font size=-1>Previous<br>Article</font></A></td>
<td><A HREF="http://xp5.dejanews.com/getdoc.xp?recnum=7963428&server=db97p4&CONTEXT=874103825.621937221&hitnum=21"><IMG ALT="[Next Article]" BORDER=0 SRC="http://web3.dejanews.com/gifs/next.gif" width=32 height=25 hspace=6><br><font size=-1>Next<br>Article</font></A></td>
<td><A HREF="http://xp5.dejanews.com/dnquery.xp?search=next&ST=QS&site=dn&offsets=db97p4%0220&CONTEXT=874103825.621937221"><IMG ALT="[Current Results]" BORDER=0 SRC="http://web3.dejanews.com/gifs/curr.gif" width=26 height=27 hspace=6><br><font size=-1>Current<br>Results</font></A></td>
<td><A HREF="http://xp5.dejanews.com/dnquery.xp?search=thread&filter=&svcclass=dncurrent&threaded=1&ST=PS&CONTEXT=874103825.621937221&HIT_CONTEXT=874103825.621937221&HIT_NUM=20&recnum=[email-masked]%3e%231/1"><IMG ALT="[View Thread]" BORDER=0 SRC="http://web3.dejanews.com/gifs/thr.gif" width=34 height=27 hspace=6><br><font size=-1>View<br>Thread</font></A></td>
<td><A HREF="http://postnews.dejanews.com/post.xp?NG=gnu.gcc.help"><IMG ALT="[Post Message]" BORDER=0 WIDTH=31 HEIGHT=28 hspace=6 SRC="http://web3.dejanews.com/gifs/post_a.gif"><br><font size=-1>Post<br>Message</font></A></td>
</tr></table><br><PRE>
<B>Subject:      <FONT SIZE=+1 color="#c60012">How to build gcc under HP-UX 10.20</FONT>
From:         [email-masked] (Grant W. Petty)
Date:         1997/09/02
Message-Id:   &lt;[email-masked]&gt;
Newsgroups:   gnu.gcc.help
<A HREF="http://xp5.dejanews.com/getdoc.xp?recnum=8586922&server=db97p4&CONTEXT=874103825.621937221&hitnum=20&AH=1">[More Headers]</A>
</B>

Earlier I reported maddening problems building <B>gcc</B> under HP-UX <B>10.20</B>
on a PA8000 processor.  Based on the responses I received, especially
from Don Perkins, I can now summarize what works, at least for me:

1) First acquire and install the GNU versions of &quot;make&quot; and &quot;sed&quot;.
The HP-UX 10.xx versions of both are apparently defective.  There is a
binary version of sed available for HP-UX 10.x at
<A HREF="ftp://labrea.stanford.edu/gnu/sed-2.05.bin.hpux10">ftp://labrea.stanford.edu/gnu/sed-2.05.bin.hpux10</A> 
GNU &quot;make&quot; can be successfully built from source using the bundled
HP-UX cc compiler. 

Set your path so that the GNU versions of 'sed' and 'make', rather
than the system versions, are used when building <B>gcc</B>.  Alternatively,
create links to these executables in your <B>gcc</B> build directory. I am
told that GNU &quot;bison&quot; might also be needed, but I can't confirm
whether this is always true or not.

2)  In order to be able to use gdb (the GNU debugger) with your
compiled code, you should also install GNU &quot;binutils&quot;, which includes
the GNU assembler.  When you build <B>gcc</B>, you will want to create a link to
/usr/local/bin/as  in whichever directory is being used for the
compile, include the stage1 and stage2 directories.

3)  DON'T get <B>gcc</B> version 2.7.2.2 -- this version still chokes on the
header files due to undefined macros and symbols; get the brand new
version 2.7.2.3 instead, which apparently solves that problem. 

4) when you execute &quot;./configure&quot; in the build directory, use the
option &quot;--with-gnu-as&quot;

5) From this point onward, the build should be done as described in
the INSTALL file.  

	Grant

P.S. Appended is the original message I got from Don Perkins pointing
out most of the above requirements, plus a few other useful facts as well.

----------------------------------------------------------------------
From <A HREF="/profile.xp?author=[email-masked]&ST=QS">[email-masked]</A>  Thu Aug 28 12:39:49 1997
Date: Thu, 28 Aug 1997 10:39:00 -0700

In addition to what Otmar Stahl has said...

* You may find it useful to get the latest GNU `make' and `gdb' as
  well.  (They compile fine using HP's K&amp;R compiler -- well make does
  anyway.  For efficiency reasons, I would suggest re-<B>compiling</B> them
  once you have <B>gcc</B> up.)  GNU make will be _required_ to compile the
  `binutils' package, due to yet another problem with HP-UX 10.x make.

* Definitely get `binutils'.  <B>Compiling</B> with `gas' allows you to use
  the -g (debug) options of <B>gcc</B>.  (Note that `ld' will not be compiled
  or replaced.  This is OK.)  

* If you compile binutils before you make your <B>gcc</B> compiler, be sure
  to run ./configure with the `--with-gnu-as' option when making <B>gcc</B>. 
  (Do _NOT_ use the `--with-gnu-ld' option!)

* Somewhere in there you may need `bison' as well.  Get it from your
  local GNU library.  While you are at it, pick up `flex', since HP
  does not provide lex.  While lex is not required for <B>gcc</B>, there will
  probably be a time when you will need it.  Might as well do the
  compile now while you are `down'.

* libg++ (the c++ library) is configured for HP-UX.  glibc 2.0 is
  _not_.  Don't even bother downloading it unless you plan on doing
  the port.

* There is a _binary_ for GNU SED 2.05 for <B>HPUX</B> 10.x on the GNU
  mirrors.  (<A HREF="ftp://labrea.stanford.edu/gnu/sed-2.05.bin.hpux10">ftp://labrea.stanford.edu/gnu/sed-2.05.bin.hpux10</A> should
  do the trick.)

* I would imagine the time.h patch (which I also need -- libg++ dies
  during make when it hits time.h) can be found at
  <A HREF="http://software.external.hp.com:80/">http://software.external.hp.com:80/</A> and then selecting &quot;HP Patches&quot;.

In summary: 
   * The following HP-UX <B>10.20</B> files are screwed up in the original 
     distribution: 
        sed, make, time.h.  

   * If you are using <B>gcc</B>, you might as well have:
        binutils, gdb, bison, libg++, flex

   * On HP-UX you cannot use:
        GNU ld  (Not a problem, don't worry about it.)

   * No one has yet ported an HP-UX distribution of:
        GNU glibc 2.x

----------------------------------------------------------------------
Don Perkins                                      <A HREF="/profile.xp?author=[email-masked]&ST=QS">[email-masked]</A>
----------------------------------------------------------------------

-- 
Grant W. Petty                        |Assoc. Prof.,  Atmospheric Science
Dept. of Earth &amp; Atmospheric Sciences |Voice:  (765)-494-2544
Purdue University, 1397 CIVL Bldg.    |Fax:    (765)-496-1210
West Lafayette, IN 47907-1397, USA    |Email: <A HREF="/profile.xp?author=[email-masked]&ST=QS">[email-masked]</A>
</PRE>

<hr align=left width=470>

<A HREF="http://gtp2.dejanews.com/gtc?id=-229.0&tm=874104388.121634&site=dn&location=gnu.gcc.help&keywords=compiling%20gcc%20on%20hpux%2010.20&cr=%7c%7c%7c%7c%7c%7c%7c%7c">
<IMG ALIGN=MIDDLE HEIGHT=60 WIDTH=468 SRC="http://web2.dejanews.com/ads/uswest_3.gif" ALT="Please visit our sponsor" border=1></A><BR>
<table cellspacing=0 cellpadding=0 border=0><tr valign=center>
<td><nobr><hr align=left noshade size=1 width=470>
<font size=-1 color="#666666"><A HREF="http://xp5.dejanews.com/getdoc.xp?recnum=9638602&server=db97p4&CONTEXT=874103825.621937221&hitnum=19">Previous</A> &nbsp;|&nbsp; 
<A HREF="http://xp5.dejanews.com/getdoc.xp?recnum=7963428&server=db97p4&CONTEXT=874103825.621937221&hitnum=21">Next</A> &nbsp;|&nbsp; 
<A HREF="http://xp5.dejanews.com/dnquery.xp?search=next&ST=QS&site=dn&offsets=db97p4%0220&CONTEXT=874103825.621937221">Results</A> &nbsp;|&nbsp; 
<A HREF="http://xp5.dejanews.com/dnquery.xp?search=thread&filter=&svcclass=dncurrent&threaded=1&ST=PS&CONTEXT=874103825.621937221&HIT_CONTEXT=874103825.621937221&HIT_NUM=20&recnum=[email-masked]%3e%231/1">View Thread</A> &nbsp;|&nbsp; 
<A HREF="/profile.xp?author=[email-masked]%20(Grant%20W.%20Petty)&ST=PS">Author Profile</A> &nbsp;|&nbsp; 
<A HREF="http://postnews.dejanews.com/post.xp?NG=gnu.gcc.help">Post Message</A> &nbsp;|&nbsp; 
<A HREF="http://postnews.dejanews.com/post.xp?NG=gnu.gcc.help&SUB=Re:%20How%20to%20build%20gcc%20under%20HP-UX%2010.20&REF=[email-masked]%3e&server=db97p4&recnum=8586922">Post Reply</A> &nbsp;|&nbsp; 
<A HREF="mailto:[email-masked]">Send Email</A></font></nobr></td></tr></table>
<table width=470 cellpadding=0 cellspacing=0 border=0>
<tr>
<td align=center><hr noshade size=1 width=470>
<font size=-1>Copyright &copy; 1995-97 <A HREF="http://web3.dejanews.com/info/policy.shtml">Deja News, Inc.</A> All rights reserved.</font>
</td>
</tr>
</table>
</td></tr></table>
</body>
</html>

---

From: Robert Granat <[email-masked]>
Date: Fri, 12 Sep 1997 16:23:58 -0700 (PDT)

> > I was wondering if anyone had any ideas about what it going wrong.

I just wanted to say thank you to all the people who provided such quick
and useful responses...

I installed Xpm, and forced fvwm to compile using gcc, and that seems to 
have gotten rid of most of the problems.

Right now it compiles, but I'm getting warning messages for many modules
along the lines of:

Parse.c:28: warning: assignment discards `const' from pointer target type

builtins.c:681: warning: passing arg 2 of `GetOneArgument' from incompatible 
pointer type

Should I be worried about this at all?  Is this normal behavior?

I'm not on terminal right now, so I can't check it the quick and easy way
by just running the executable.

Thanks again,
Robert