Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#62423 closed defect (fixed)

graphviz @2.40.1: libtool: compile: unable to infer tagged configuration

Reported by: TonyCrawford Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc: cjones051073 (Chris Jones), Wowfunhappy (Jonathan)
Port: graphviz, graphviz-devel

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Tried after cleaning and reconfiguring; it's well stuck.

OS X 10.9.5;

Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn);

Appending main.log and port -v installed;

here's the build command that seems to trip the error:

:info:build /bin/sh ../../libtool    --mode=compile /usr/bin/clang -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../lib/common -I../../lib/pathplan -I../../lib/gvc -I../../lib/cgraph -I../../lib/cdt  -I/opt/local/include -I/opt/local/include  -pipe -Os -arch x86_64 -MT GVTextLayout.lo -MD -MP -MF .deps/GVTextLayout.Tpo -c -o GVTextLayout.lo GVTextLayout.m
:info:build libtool: compile:  /usr/bin/clang -std=gnu11 -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../lib/common -I../../lib/pathplan -I../../lib/gvc -I../../lib/cgraph -I../../lib/cdt -I/opt/local/include -I/opt/local/include -pipe -Os -arch x86_64 -Wall -Wextra -Wmissing-include-dirs -Wswitch-default -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -fno-common -Wall -MT gvtextlayout_quartz.lo -MD -MP -MF .deps/gvtextlayout_quartz.Tpo -c gvtextlayout_quartz.c  -fno-common -DPIC -o .libs/gvtextlayout_quartz.o
:info:build libtool: compile: unable to infer tagged configuration
:info:build libtool:   error: specify a tag with '--tag'
:info:build make[3]: *** [GVTextLayout.lo] Error 1

Attachments (2)

main.log (2.1 MB) - added by TonyCrawford 4 years ago.
main.log
port-v-installed (187.7 KB) - added by TonyCrawford 4 years ago.
port -v installed output

Change History (11)

Changed 4 years ago by TonyCrawford

Attachment: main.log added

main.log

Changed 4 years ago by TonyCrawford

Attachment: port-v-installed added

port -v installed output

comment:1 Changed 4 years ago by jmroot (Joshua Root)

Description: modified (diff)
Keywords: graphviz tag tagged configuration removed
Owner: set to ryandesign
Status: newassigned

That libtool invocation is indeed missing --tag=CC.

comment:2 Changed 3 years ago by cjones051073 (Chris Jones)

works fine if you force use of macports clang 9.0

sudo port install graphviz configure.compiler=macports-clang-9.0

so adding a compiler blacklist to enforce this for the old OSes that are affected is an option to fix this.

comment:3 Changed 3 years ago by cjones051073 (Chris Jones)

Cc: cjones051073 added

comment:4 in reply to:  2 Changed 3 years ago by mkeller (Markus Keller)

Replying to cjones051073:

works fine if you force use of macports clang 9.0

sudo port install graphviz configure.compiler=macports-clang-9.0

To recover from the broken state, you need to run this before installing again with the explicit compiler option as given above:

sudo port clean graphviz

comment:5 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Certainly I don't want to blacklist compilers just to fix this. The correct fix, as jmr already alluded, is to add the --tag=CC flag where it's needed. We are working on an update to graphviz 2.47.0. If that does not resolve the issue, then we'll patch it correctly and send the fix to the developers.

comment:6 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: Wowfunhappy added

Has duplicate #62679.

comment:7 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Port: graphviz-devel added
Status: assignedaccepted
Summary: graphviz 2.40: libtool: compile: unable to infer tagged configurationgraphviz @2.40.1: libtool: compile: unable to infer tagged configuration

It took me awhile to reacquaint myself with this error. We used to see a lot of "unable to infer tagged configuration" errors around ten years ago. That was when Apple switched compilers from gcc to briefly llvm-gcc and finally to clang. At that time, the error only seemed to occur if the compiler that had been used to make libtool was different from the compiler being used to compile something else (i.e. graphviz) with libtool now. I'm not certain whether that's the same thing that's happening now. We don't know what compiler the two reporters used when compiling their libtool, but the usual for OS X 10.9 would be to use the normal /usr/bin/clang, in which case the problem should not have occurred.

I was not able to reproduce the problem on my macOS 10.13 machine where both my libtool and graphviz were being compiled with /usr/bin/clang. I also couldn't reproduce the problem by trying to compile graphviz with a different (MacPorts clang) compiler. However we did recently reproduce the problem on a MacPorts automated build machine, and there again both libtool and graphviz were being compiled with the same compiler (/usr/bin/gcc-4.2 in that case).

I can however see that that --tag=CC is indeed missing when invoking libtool to compile GVTextLayout.m. It looks like upstream had tried to fix this problem five years ago however their fix contained two mistakes so it didn't work, and it doesn't appear to have been corrected yet in the current version. I've reported the problem to them and proposed a fix: https://gitlab.com/graphviz/graphviz/-/issues/2065

comment:8 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In 65179be5441511e7fa4e727e0f5a34503812cfa2/macports-ports (master):

graphviz, graphviz-devel: Fix build failure

Fix "libtool: compile: unable to infer tagged configuration" build
failure seen on some systems by always specifying the --tag=... flag
when invoking libtool.

Closes: #62423

comment:9 Changed 3 years ago by Smattr (Matthew Fernandez)

For posterity, Ryan's fix was committed upstream to Graphviz in 0659bad2181320a271c472687adc141904698552. This will go into Graphviz 2.47.3 which I'm planning to cut in a couple of weeks. When it's pulled into Macports, the above patch should be able to be dropped on your side.

Note: See TracTickets for help on using tickets.