bugDatabase-driven manual pager suite - Bugs: bug #16139, Compile error on Solaris - setenv...

 
 

bug #16139: Compile error on Solaris - setenv undeclared

Submitted by:  spiralvoice <spiralvoice>
Submitted on:  Tue 21 Mar 2006 10:34:57 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Colin Watson <cjwatson>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 28 Apr 2008 08:51:09 AM UTC, comment #5:

I believe that this is fixed by the full conversion to Automake and Gnulib in man-db 2.5.1; that dropped the hand-written Makefiles in favour of Automake's more standards-compliant ones that should honour LDFLAGS as expected, and imported much more portability code that should get rid of glitches like the mkdtemp and allocsa.h problems you reported. I'd appreciate confirmation. From docs/NEWS:

o Automake is now used to generate Makefiles. Among other things,
this fixes VPATH builds and some bugs in dependency generation,
and should allow building with non-GNU versions of make.

o man-db now uses the Gnulib portability library, allowing the
removal of earlier haphazard portability code. While this results
in a somewhat larger source distribution, it makes man-db easier
to maintain and should make it easier to build on systems to which
the maintainer does not have access.

Colin Watson <cjwatson>
Project AdministratorIn charge of this item.
Mon 08 Jan 2007 01:58:43 PM UTC, comment #4:

The rest of this is going to be very painful to try to fix before switching to automake, so I think I'll just release man-db 2.4.4 with what I've got so far and then work on that.

Colin Watson <cjwatson>
Project AdministratorIn charge of this item.
Mon 08 Jan 2007 12:17:23 PM UTC, comment #3:

Mon Jan 8 12:10:08 GMT 2007 Colin Watson <cjwatson@debian.org>

* acinclude.m4 (MAN_FUNC_FNMATCH): New macro to check whether
fnmatch supports the FNM_CASEFOLD flag (a GNU extension).
* configure.ac: Use it.

Colin Watson <cjwatson>
Project AdministratorIn charge of this item.
Wed 22 Mar 2006 01:55:48 PM UTC, comment #2:

The setenv problem seems solved, thanks.

But:

globbing.c: In function `match_in_directory':
globbing.c:261: error: `FNM_CASEFOLD' undeclared (first use in this function)
globbing.c:261: error: (Each undeclared identifier is reported only once
globbing.c:261: error: for each function it appears in.)

On Solaris /usr/include/fnmatch.h does not declare FNM_CASEFOLD
Removing the define HAVE_FNMATCH_H from config.h fixes this.

setenv.c:35:22: allocsa.h: No such file or directory
Commenting out this line lets to code compile.

Linking does not respect system $LDFLAGS.
On Solaris -lintl is needed for linking.

../lib/libman.a(mkdtemp.o): In function `mkdtemp':
mkdtemp.c:(.text+0x10): undefined reference to `__gen_tempname'

I do not know how to solve this.

spiralvoice <spiralvoice>
Tue 21 Mar 2006 11:12:27 AM UTC, comment #1:

Thanks for the note. Rather than switching to putenv, which has a less convenient interface, I've copied a replacement setenv function from gnulib and made the build system use it if setenv isn't available.

Could you please check out current man-db CVS, install the GNU autotools, run ./autogen.sh, and see if the result builds for you now?

Colin Watson <cjwatson>
Project AdministratorIn charge of this item.
Tue 21 Mar 2006 10:34:57 AM UTC, original submission:

On Solaris putenv has to be used instead, configure already
defines HAVE_PUTENV but man.c does not make use of it.

bash-3.1$ gcc -L/usr/local2/lib -R/usr/local2/lib man.o security.o convert_name.o manp.o ult_src.o compression.o filenames.o util.o globbing.o encodings.o ../libdb/libmandb.a version.o ../lib/libman.a -ldb-4 -lintl -o man
man.o: In function `main':
man.c:(.text+0x172c): undefined reference to `setenv'
man.c:(.text+0x1978): undefined reference to `setenv'
man.o: In function `make_roff_command':
man.c:(.text+0x42d0): undefined reference to `setenv'
man.o: In function `setenv_less':
man.c:(.text+0x4778): undefined reference to `setenv'
man.c:(.text+0x4960): undefined reference to `setenv'
man.o:man.c:(.text+0x49ac): more undefined references to `setenv' follow

spiralvoice <spiralvoice>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cjwatson (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 05 May 2008 01:36:50 AM UTCcjwatsonOpen/ClosedOpen=>Closed
    Mon 28 Apr 2008 08:51:09 AM UTCcjwatsonStatusReady For Test=>Fixed
    Tue 21 Mar 2006 11:13:10 AM UTCcjwatsonStatusNone=>Ready For Test
      Assigned toNone=>cjwatson

    Back to the top


    Powered by Savane 3.1-cleanup1