[MacPorts] #32415: flex configure fails when an existing broken flex is installed (was: flex configure fails)

MacPorts noreply at macports.org
Tue Dec 6 18:24:40 PST 2011


#32415: flex configure fails when an existing broken flex is installed
---------------------------------+------------------------------------------
 Reporter:  mparchet@…           |       Owner:  mww@…           
     Type:  defect               |      Status:  new             
 Priority:  Normal               |   Milestone:                  
Component:  ports                |     Version:  2.0.3           
 Keywords:                       |        Port:  flex            
---------------------------------+------------------------------------------

Comment(by ryandesign@…):

 Thanks. That config.log doesn't seem to have been created by a MacPorts-
 initiated installation attempt. I see on line 7 that it was created by
 just running "./configure"; MacPorts would have run "./configure
 --prefix=/opt/local --infodir=/opt/local/share/info
 --mandir=/opt/local/share/man". Perhaps after the MacPorts build failed,
 you tried running ./configure again manually?

 Further down, on line 39, it shows the parts of your PATH. Since this
 config.log was not made in the context of MacPorts, it shows your shell
 environment's PATH, not the PATH MacPorts would set. It shows you have the
 MacPorts paths /opt/local/bin and /opt/local/sbin in your PATH four times
 each, which is not a problem but is redundant. It also shows you have
 /sw/bin and /sw/sbin in your PATH, which is a problem if those directories
 contain anything. Those directories are part of Fink (another package
 manager) and it's not supported to have more than one package manager
 installed at a time; doing this can lead to conflicts and unexpected
 behavior. Please decide whether you would like to use Fink or MacPorts (or
 Homebrew, even), and uninstall the other(s).

 It also shows that your PATH contains /usr/local/bin. This is part of the
 default PATH on OS X, and it's not a problem if there's nothing in there.
 But /usr/local could contain software you installed manually, or using
 Homebrew; either would again be a problem for MacPorts and a potential
 source of conflicts and problems. Ports built using MacPorts might look in
 /usr/local for headers or libraries and find them and use them. And this
 is exactly what happened in your case, according to the log. On line 334
 it says:

 {{{
 configure:4877: checking lex output file root
 configure:4888: flex conftest.l
 dyld: Library not loaded: /usr/local/lib/libintl.3.dylib
   Referenced from: /opt/local/bin/flex
   Reason: image not found
 ./configure: line 4889:  1002 Trace/BPT trap: 5       flex conftest.l
 }}}

 This shows that you already have flex installed with MacPorts, and that at
 the time it was installed, it found a copy of the gettext
 internationalization library, libintl, in /usr/local/lib, and used it
 instead of the MacPorts version it was supposed to use. Since then,
 perhaps at our direction, you removed that libintl from /usr/local/lib, so
 now MacPorts flex can't find it and so it can't run.

 The solution is to deactivate this broken flex, then clean the flex port
 and try to build it again.

 {{{
 sudo port -f deactivate flex
 sudo port clean flex
 sudo port install flex
 }}}

 It is possible you have other programs or libraries installed by MacPorts
 that are also inadvertently linked with libraries in /usr/local/lib (or
 /sw/lib). You could use `otool -L` to examine all of your programs and
 libraries, and if you find any, ensure those non-MacPorts libraries are
 gone, then rebuild the affected port(s). For example to rebuild port
 ''foo'' you could:

 {{{
 sudo port -n upgrade --force foo
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/32415#comment:5>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list