Opened 8 years ago

Closed 8 years ago

#693 closed defect (fixed)

configure file of omega could not generate Makefile

Reported by: lhz7370 Owned by: Olly Betts
Priority: normal Milestone: 1.2.22
Component: Omega Version: 1.2.21
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: Linux

Description (last modified by Olly Betts)

When I run ./configure --prefix=/xapian-path XAPIAN_CONFIG=/xapian-path/bin/xapian-config under xapian-omega-1.2.21 dir, there is no error message output, but Makefile could not be generated

part of output at last:

checking for mkdtemp... yes
checking for mmap... yes
checking for fork... yes
checking for setrlimit... yes
checking for sysmp... no
checking for pstat_getdynamic... no
checking for library containing socketpair... none required
checking for working ISO C90 conforming snprintf... snprintf
checking for library containing iconv... none required
checking for type of input pointer for iconv... char*
checking whether byte ordering is bigendian... no
checking for perl... /usr/bin/perl
checking for pkg-config... /usr/bin/pkg-config

After this message output, no Makefile generated.

Attachments (1)

config.log (58.4 KB ) - added by lhz7370 8 years ago.
config.log attached

Download all attachments as: .zip

Change History (6)

by lhz7370, 8 years ago

Attachment: config.log added

config.log attached

comment:1 by Olly Betts, 8 years ago

Description: modified (diff)
Keywords: Makefile could not generated removed
Milestone: 1.2.x1.3.4
Priority: highnormal
Status: newassigned

Thanks for your report (and for config.log).

The problem appears to be that we're trying to return from a shell function with exit. I guess there's a difference between implementations of /bin/sh and on some shells that returns from the function, while others it exits the script. The autoconf manual says to use AS_SET_STATUS() for portability.

Needs fixing in git master first, then backporting.

comment:2 by Olly Betts, 8 years ago

As a workaround, try running this command to change those uses of exit to return, which should work with any /bin/sh you'd have on Linux:

sed -i '17100,17200 s/exit/return/' configure

Then re-run the configure command.

comment:3 by Olly Betts, 8 years ago

Milestone: 1.3.41.2.22
Severity: majornormal

Fixed in git master by [334fb5cd47221932e179d60f4c8e1eb15f6c6526].

I think in fact that using exit here is probably wrong for all shells (it seems to exit the shell for at least bash and dash in simple tests). However, this function is only used if PCRE isn't found, and most people probably build with PCRE (in 1.2.x, PCRE is an optional dependency; for git master, it's now a requirement).

So another way to avoid this is to install the PCRE development package.

Needs backporting.

comment:4 by lhz7370, 8 years ago

Olly,

Thanks for your quick response, the workaround works.

comment:5 by Olly Betts, 8 years ago

Resolution: fixed
Status: assignedclosed

Backported for 1.2.22 in [0d73babb21da2f0bc727a4f88997162945c437ac].

Note: See TracTickets for help on using tickets.