Opened 10 years ago

Closed 7 years ago

#46132 closed defect (fixed)

openjade @1.3.2_8: fails to build on OSX Lion

Reported by: pilgrimaflame@… Owned by: lockhart (Thomas Lockhart)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc: ksee.zelgadis@…, dholl (D. Holl)
Port: openjade

Description (last modified by larryv (Lawrence Velázquez))

openjade fails to build on OSX Lion, with Xcode 4.2.1 installed. I get the following error code output in Terminal.

 --->  Building openjade
Error: org.macports.build for port openjade returned: command execution failed

Attachments (3)

main.log (167.3 KB) - added by pilgrimaflame@… 10 years ago.
main.2.log (8.1 KB) - added by ksee.zelgadis@… 10 years ago.
for openjade@1.3.2_10
main.3.log (185.3 KB) - added by m.rick@… 10 years ago.

Download all attachments as: .zip

Change History (22)

Changed 10 years ago by pilgrimaflame@…

Attachment: main.log added

comment:1 Changed 10 years ago by pilgrimaflame@…

This my first use of the TRAC system, so I apologize in advance for my newbieness in general. I'm not a developer, just an avid private Macports user.

comment:2 in reply to:  1 Changed 10 years ago by larryv (Lawrence Velázquez)

Description: modified (diff)
Keywords: openjade removed
Owner: changed from macports-tickets@… to tlockhart1976@…
Summary: openjade fails to build on OSX Lionopenjade @1.3.2_8: fails to build on OSX Lion
Type: requestdefect

No need. This is rather good, as far as first Trac tickets go :)

In future tickets, try to Cc port maintainers (port info --maintainers openjade).

comment:3 Changed 10 years ago by ksee.zelgadis@…

Hello! I have same problem with building open jade. But the version I have tried is 1.3.2_10.

OSX version: 10.8.2, 64bit.

I am attaching the log file.

Changed 10 years ago by ksee.zelgadis@…

Attachment: main.2.log added

for openjade@1.3.2_10

comment:4 Changed 10 years ago by pilgrimaflame@…

The version attempting to install for me has been 1.3.2_8.

comment:5 Changed 10 years ago by ksee.zelgadis@…

Cc: ksee.zelgadis@… added

Cc Me!

comment:6 Changed 10 years ago by m.rick@…

I have the same problem under Lion and XCode 4.6.3 Couldn't build GTK2 with +quartz +python27

Last edited 10 years ago by m.rick@… (previous) (diff)

Changed 10 years ago by m.rick@…

Attachment: main.3.log added

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

These are not the same problems. The original main.log shows a link error, which may be due to a problem with the copy of libosp.dylib on the system (e.g., it might be for a different architecture).

main.2.log is not from a clean build, so the first step should be cleaning and re-trying. It seems libosp.dylib is missing on this system:

:info:build make[2]: *** No rule to make target `/tmp/skl/SynfigStudio.lapp/Contents/Resources/lib/libosp.dylib', needed by `openjade'.  Stop.

main.3.log is a similar instance:

:info:build make[2]: *** No rule to make target `/Applications/Dia.lapp/Contents/Resources/lib/libosp.dylib', needed by `openjade'.  Stop.

I don't know why openjade's build system tries to put stuff into /Applications/Dia.lapp, which it certainly shouldn't, but I don't know why this happens either. Normally, I'd recommend building with trace mode enabled (i.e. sudo port -t ...), but as far as I know that fails for openjade. It might be worth a shot, though, because it would hide these files from the build system. It might be enough to complete configure with trace mode enabled and re-run the same command without -t once it failed.

comment:8 Changed 10 years ago by m.rick@…

it's because i made a try with this path not to pollute a previous working installation.

But I then did a new try with a fresh install in /opt/local as usual and began by trying first by installing OpenJade as a very first port and got the same error, OpenJade didn't build.

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

Is /opt/local/lib/opensp.dylib present on your system and the opensp port installed?

comment:10 Changed 9 years ago by lockhart (Thomas Lockhart)

I cannot reproduce the problem on Yosemite:

sudo port uninstall docbook-xml-4.3 docbook-xml-4.4 docbook-xml-4.5 iso8879 docbook-xml-4.2 openjade docbook-sgml-4.2 docbook-utils p5.22-sgmlspm docbook-dsssl docbook-xml-5.0 docbook-xsl docbook-xsl-ns sgml-common
sudo rm -rf /opt/local/etc/sgml /opt/local/etc/xml
sudo port install -s openjade

I believe that this ticket should be retired.

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

Resolution: worksforme
Status: newclosed

Closing at maintainer request.

comment:12 Changed 8 years ago by ridethecliche@…

Something is messed up here. On my Snow Leopard box, I built MacPorts from source with a prefix=/Applications/Program.app/macports

Then I tell MP to install OpenJade. Dependancies get pulled-in and built (including opensp) without issue. When it gets to OpenJade, the build dies on me in the same spot as m.rick@'s main.3.log.

Somehow the letter 'l' is getting jammed to the prefix string after the first "." in the string

His build location is actually "/Applications/Dia.app/Contents/Resources/lib" -- But it's looking in ..../Dia.lapp/...

In my case, my build dies at "No rule to make target `/Applications/Program.lapp/macports/lib/libosp.dylib'"

If I do something horrible and ugly like... sudo cp /Applications/Program.app/macports/lib/libosp.dylib /Applications/Program.lapp/macports/lib ...and re-rerun "port -v install openjade" the build completes.

HTH

comment:13 in reply to:  12 Changed 7 years ago by dholl (D. Holl)

Resolution: worksforme
Status: closedreopened

I can confirm this problem is still happening as well. In my case, I'm building with a prefix of /Applications/GNURadio.app, and something during the openjade build expects to find /Applications/GNURadio.lapp

Here's the specific error:

:info:build make[2]: *** No rule to make target `/Applications/GNURadio.lapp/Contents/Resources/lib/libosp.dylib', needed by `openjade'.  Stop.

For now, I've fixed my own automated build by creating a symbolic link from GNURadio.lapp to GNURadio.app.

This problem is reproducible, and my script is available here: https://github.com/dholl/gnuradio-for-mac-without-x11/blob/b5d576318f5f8ae3809eabcb11862de1ff9d6bdd/build.sh#L128

To reproduce the problem, just comment out the two blocks of "openjade WORK AROUND" code and then run build.sh:

./build.sh ./GNURadio.app

comment:14 Changed 7 years ago by dholl (D. Holl)

I think the problem is in Makefile.prog.in. Is MacPorts, this file is patched by patch-clang.diff and patch-delete_la_files.diff in textproc/openjade/files/

Check out this sed expression in patch-clang.diff

...
diff -Nurd -x'*~' Makefile.prog.in Makefile.prog.in
--- Makefile.prog.in	2002-01-22 06:57:53.000000000 -0500
+++ Makefile.prog.in	2007-04-23 03:40:08.000000000 -0400
@@ -12,14 +12,14 @@
 
 ALL_LIBS = $(XLIBS) $(LIBS)
 Makefile.lt:
-	echo 'LT_LIBS='`echo $(ALL_LIBS)|sed 's/\.a/.la/g'` >Makefile.lt
+	echo 'LT_LIBS='`echo $(XLIBS)|sed 's/\.a/.la/g'` >Makefile.lt
 
 PROG:=$(shell echo "$(PROG)" | sed '@program_transform_name@')
 
 all: $(PROG)

...

and again in patch-delete_la_files.diff

--- Makefile.prog.in.orig	2013-09-02 18:50:59.000000000 -0700
+++ Makefile.prog.in	2013-09-02 18:52:56.000000000 -0700
@@ -12,7 +12,7 @@ LINKFLAGS = @LINKFLAGS@
 
 ALL_LIBS = $(XLIBS) $(LIBS)
 Makefile.lt:
-	echo 'LT_LIBS='`echo $(XLIBS)|sed 's/\.a/.la/g'` >Makefile.lt
+	echo 'LT_LIBS='`echo $(XLIBS)|sed 's/\.a/.la/g'|sed 's|libosp\.la|libosp.dylib|'` >Makefile.lt
 
 PROG:=$(shell echo "$(PROG)" | sed '@program_transform_name@')
 

I think the problem is in the regular expression \.a given for sed's search pattern

 ... | sed 's/\.a/.la/g' ...

which matches a literal .a anywhere in the string.

For example, given this input:

> echo moo/Something.app/blah.a/libwtf.a moo/Something.app/blech.a/libfubar.a
moo/Something.app/blah.a/libwtf.a moo/Something.app/blech.a/libfubar.a

this expression transforms .app, .a/ and the trailing .a's here:

> echo moo/Something.app/blah.a/libwtf.a moo/Something.app/blech.a/libfubar.a | sed 's/\.a/.la/g'
moo/Something.lapp/blah.la/libwtf.la moo/Something.lapp/blech.la/libfubar.la

This sed expression needs the search modified to prevent changing all .a occurrences.

In this next example, I'll modify it to look for either a trailing end-of-line (regex $) or a white-space (regex: [[:space:]]) after the literal .a (regex: \.a). To match either $ or [[:space:]], I'll join them with ( | ), so I'll also pass -E to sed to enable this "extended regular expression" syntax. I'll also need to include a \1 in the replacement side of the sed expression to preserve the white-space that gets included in the match.

> echo moo/Something.app/blah.a/libwtf.a moo/Something.app/blech.a/libfubar.a | sed -E 's/\.a([[:space:]]|$)/.la\1/g'
moo/Something.app/blah.a/libwtf.la moo/Something.app/blech.a/libfubar.la

(I included the extra description for folks who may not already be versed in regular expressions...)

I summary, the fix is to change sed 's/\.a/.la/g' in these patches to sed -E 's/\.a([[:space:]]|$)/.la\1/g'

I'm testing this now through https://github.com/dholl/macports-ports/tree/fix-openjade-a-to-la

(My test will take a while, since I'll just re-run my whole project from scratch for my own paranoia.)

Questions? Comments?

Once I have a working fix, is there any special process beside submitting a usual GitHub PR to incorporate it?

Last edited 7 years ago by dholl (D. Holl) (previous) (diff)

comment:15 Changed 7 years ago by dholl (D. Holl)

Cc: dholl added

comment:16 Changed 7 years ago by dholl (D. Holl)

Looks like this problem was also identified upstream in https://sourceforge.net/p/openjade/bugs/143/ with a similar proposed fix.

Is openjade maintained anymore? The upstream ticket was from 2013-03-29.

comment:17 Changed 7 years ago by dholl (D. Holl)

Heh, this problem was fixed years ago in MacPorts r122971, but then the fix appear to have been accidentally reverted.

See my comment 3 in #46058 (where the regression happened) and comment 10 in #42434 where this .a to .la problem was first reported.

So #46132 is a dup of #42434, if you're willing to look past the symlink stunt of #42434's original reporter.

Last edited 7 years ago by dholl (D. Holl) (previous) (diff)

comment:18 Changed 7 years ago by dholl (D. Holl)

I just submitted https://github.com/macports/macports-ports/pull/551

Critiques, comments, etc... are welcome. Whatever it takes to fix this nuisance. :)

comment:19 Changed 7 years ago by dholl (D. Holl)

Resolution: fixed
Status: reopenedclosed

In 47e3d647d426baf70f931c56768c8fa038d01eab/macports-ports:

openjade: fix overzealous .a -> .la translation

Closes: #46132

Note: See TracTickets for help on using tickets.