Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#38214 closed defect (fixed)

libcomerr: Uses automagic dependency on [g]awk, when available, breaking compile_et later on

Reported by: skymoo (Adam Mercer) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc:
Port: libcomerr

Description

kerberos5 @1.11_2 fails with:

:info:configure checking for compile_et... compile_et
:info:configure checking whether compile_et is useful... configure: error: execution failed

full build log attached.

Attachments (2)

main.log (38.1 KB) - added by skymoo (Adam Mercer) 11 years ago.
config.log (25.2 KB) - added by skymoo (Adam Mercer) 11 years ago.

Download all attachments as: .zip

Change History (15)

Changed 11 years ago by skymoo (Adam Mercer)

Attachment: main.log added

comment:1 Changed 11 years ago by neverpanic (Clemens Lang)

Owner: changed from macports-tickets@… to cal@…

Please attach config.log.

Changed 11 years ago by skymoo (Adam Mercer)

Attachment: config.log added

comment:2 in reply to:  1 Changed 11 years ago by skymoo (Adam Mercer)

Replying to cal@…:

Please attach config.log.

Attached.

comment:3 Changed 11 years ago by neverpanic (Clemens Lang)

Unfortunately the config.log isn't very helpful here:

configure:4705: checking for compile_et
configure:4721: found /opt/local/bin/compile_et
configure:4732: result: compile_et
configure:4747: checking whether compile_et is useful
configure:4754: error: execution failed

Can you try executing /opt/local/bin/compile_et yourself? What do the follwing commands print?

/opt/local/bin/compile_et
/sbin/md5 /opt/local/bin/compile_et
ls -lash /opt/local/bin/compile_et
ls -lash /opt/local/share/et/
port provides /opt/local/bin/compile_et

comment:4 Changed 11 years ago by skymoo (Adam Mercer)

$ /opt/local/bin/compile_et
Usage: compile_et file
$ /sbin/md5 /opt/local/bin/compile_et
MD5 (/opt/local/bin/compile_et) = 1efaa8db12447421fe2fbfece2ee71da
$ ls -lash /opt/local/bin/compile_et
4.0K -rwxr-xr-x 1 root admin 1.3K Feb  5 09:17 /opt/local/bin/compile_et
$ ls -lash /opt/local/share/et/
total 16K
   0 drwxr-xr-x   4 root admin  136 Feb  5 09:17 .
   0 drwxr-xr-x 126 root admin 4.2K Feb 26 11:38 ..
8.0K -rw-r--r--   1 root admin 6.4K Feb  5 09:17 et_c.awk
8.0K -rw-r--r--   1 root admin 4.5K Feb  5 09:17 et_h.awk
[ram@cizin ~]$ port provides /opt/local/bin/compile_et
/opt/local/bin/compile_et is provided by: libcomerr
$ port installed libcomerr
The following ports are currently installed:
  libcomerr @1.42.7_1 (active)
$

comment:5 Changed 11 years ago by neverpanic (Clemens Lang)

Interesting enough, your compile_et has a different md5 than mine. Can you attach it?

Since the output doesn't seem to help, I took a look at the autoconf macro that does the check:

# make sure compile_et provides "et_foo" name
cat >> conf$$e.et <<EOF
error_table foo
error_code ERR_FOO, "foo"
end
EOF
AC_CACHE_CHECK(whether compile_et is useful,krb5_cv_compile_et_useful,[
  if compile_et conf$$e.et >/dev/null 2>&1 ; then true ; else
    AC_MSG_ERROR(execution failed)
  fi
  AC_TRY_COMPILE([#include "conf$$e.h"],[&et_foo_error_table;],:,[AC_MSG_ERROR(cannot use et_foo_error_table)])
  # Anything else we need to test for?
  rm -f conf$$e.c conf$$e.h
  krb5_cv_compile_et_useful=yes
])

So it seems while compiling the file

error_table foo
error_code ERR_FOO, "foo"
end

with compile_et as the MacPorts user it returns a non-zero exit code on your system. Can you try compiling this file using compile_et? What does which awk print on your system?

comment:6 Changed 11 years ago by skymoo (Adam Mercer)

[ram@cizin tmp]$ cat foo.et
error_table foo
error_code ERR_FOO, "foo"
end
[ram@cizin tmp]$ compile_et foo.et
/opt/local/bin/compile_et: line 43: gawk: command not found
mv: rename foo.h.45776 to foo.h: No such file or directory
chmod: foo.h: No such file or directory
/opt/local/bin/compile_et: line 50: gawk: command not found
mv: rename foo.c.45776 to foo.c: No such file or directory
chmod: foo.c: No such file or directory
[ram@cizin tmp]$

I had recently uninstalled leaves and I think the gawk port was one of these. It looks like libcomer hardcodes the version of awk so a dependency on gawk should probably be declared.

I'll see if installing gawk fixes the problem

comment:7 Changed 11 years ago by skymoo (Adam Mercer)

Yep, installing gawk allows me to install kerberos5

comment:8 Changed 11 years ago by neverpanic (Clemens Lang)

So we can either add a dependency on gawk or make sure this uses /usr/bin/awk.

comment:9 Changed 11 years ago by skymoo (Adam Mercer)

Assuming any awk will do ensuring it uses /usr/bin/awk seems like the right approach to me.

comment:10 Changed 11 years ago by neverpanic (Clemens Lang)

Port: libcomerr added; kerberos5 removed
Status: newassigned
Summary: kerberos5: checking whether compile_et is useful... configure: error: execution failedlibcomerr: Uses automagic dependency on [g]awk, when available, breaking compile_et later on

Fixed in r103475.

comment:11 Changed 11 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: assignedclosed

comment:12 in reply to:  9 ; Changed 11 years ago by cooljeanius (Eric Gallager)

Replying to ram@…:

Replying to cal@…:

So we can either add a dependency on gawk or make sure this uses /usr/bin/awk.

Assuming any awk will do ensuring it uses /usr/bin/awk seems like the right approach to me.

I would have voted for adding the dependency on gawk, seeing as it's usually one of the first programs I install anyway (because doing so makes the AC_PROG_AWK autoconf macro that most configure scripts use find something quicker), but whatever, this way works too I guess...

comment:13 in reply to:  12 Changed 11 years ago by larryv (Lawrence Velázquez)

Replying to egall@…:

I would have voted for adding the dependency on gawk

Why add an unnecessary dependency?

seeing as it's usually one of the first programs I install anyway (because doing so makes the AC_PROG_AWK autoconf macro that most configure scripts use find something quicker)

A premature optimization, if I’ve ever seen one.

Note: See TracTickets for help on using tickets.