Opened 10 years ago

Closed 10 years ago

#28198 closed defect (fixed)

LyX fails to build

Reported by: carsomyr@… Owned by: nerdling (Jeremy Lavergne)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: haspatch Cc:
Port: LyX

Description

I recently tried to build LyX and ended up with a failure recorded by the attached main.log file. In short, the final linking step failed. After digging around, I traced, the error to the recent ugprade of pkgconfig:

r75297

pkgconfig: remove --enable-indirect-deps (#25345, maintainer timeout)

This in turn caused the configure script in LyX to not detect linkages that it previously did. In the old version:

>> pkg-config  --libs-only-other QtGui

-framework Carbon -framework AppKit

In the new version (pkgconfig no longer has "--enable-indirect-deps"):

>> pkg-config  --libs-only-other QtGui

Thankfully, adding a "--static" in there fixes the problem, which is what the attached patch.tgz does.

Thanks for your time!

Attachments (3)

main.log (241.9 KB) - added by carsomyr@… 10 years ago.
The failed build log.
patch-LyX.tgz (911 bytes) - added by carsomyr@… 10 years ago.
The Port patch.
patch-LyX-2.tgz (946 bytes) - added by carsomyr@… 10 years ago.
The updated patch archive.

Download all attachments as: .zip

Change History (10)

Changed 10 years ago by carsomyr@…

Attachment: main.log added

The failed build log.

Changed 10 years ago by carsomyr@…

Attachment: patch-LyX.tgz added

The Port patch.

comment:1 Changed 10 years ago by carsomyr@…

By the way, you may want to investigate how the pkgconfig change is affecting other packages.

comment:2 Changed 10 years ago by ryandesign (Ryan Schmidt)

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

As users report issues in our issue tracker, we are becoming aware of how the pkgconfig change is affecting other ports. I believe the goal is to fix the ports that are broken by this, rather than to revert the pkgconfig change.

comment:3 Changed 10 years ago by nerdling (Jeremy Lavergne)

Status: newassigned

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

Using the static libs reported by pkgconfig isn't the right approach. LyX needs to be linking against the libs it directly uses, not relying on the fact that Qt also uses them.

comment:5 Changed 10 years ago by nerdling (Jeremy Lavergne)

jmr hints: make it use -lwhatever as needed, or -framework as the case may be

comment:6 Changed 10 years ago by carsomyr@…

Ok, I've attached the patch archive LyX-patch-2.tgz, which explicitly sets flags in the configure script. For what it's worth, I also took out the build.env variable since that role seems to be handled by pkg-config now. FYI, I think the general issue is the declaration of Libs.private flags in files like /opt/local/lib/pkgconfig/QtGui.pc:

Libs: -L${libdir} -lQtGui 
Libs.private:   -L/opt/local/lib -lQtCore -framework Carbon -lz -framework AppKit -lpng -lz  

The previous configuration of pkgconfig, built with "--enable-indirect-deps", seemed to show such variables.

Changed 10 years ago by carsomyr@…

Attachment: patch-LyX-2.tgz added

The updated patch archive.

comment:7 Changed 10 years ago by nerdling (Jeremy Lavergne)

Resolution: fixed
Status: assignedclosed

Patched in r75573.

Note: See TracTickets for help on using tickets.