Opened 5 years ago

Closed 20 months ago

#58358 closed defect (worksforme)

gimp 2.10.10 link issues on Leopard

Reported by: rmottola (Riccardo) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: gimp2

Description

I had gimp 2.10.8 compiling and working with some patches. Now we have 2.10.10 it needs a patch I apply, pretty trivial, transform a runtime ind compile time detection. https://gitlab.gnome.org/GNOME/gimp/issues/3292

However, linking fails for me then with a new error with linking and I do not know where it comes from, any clues? It looks that some command/operand is missing and thus missing in the pipe command.

This is on Leopard, Lion built fail - the compile error is also on 10.6.8 (I propose to insert the patch until upstream accepts it)

/bin/sh ../../libtool  --tag=CC   --mode=link /opt/local/bin/clang-mp-5.0 -fno-strict-aliasing -pipe -Os -arch i386 -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Werror=missing-prototypes -Wstrict-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wold-style-definition -Wmissing-format-attribute -Wformat-security  -Wtype-limits -fno-common -fdiagnostics-show-option -Wreturn-type   -module -avoid-version   -export-symbols-regex initgimp -L/opt/local/lib -Wl,-headerpad_max_install_names -arch i386 -o gimp.la -rpath /opt/local/lib/gimp/2.0/python gimpmodule.lo pygimp-item.lo pygimp-display.lo pygimp-drawable.lo pygimp-image.lo pygimp-parasite.lo pygimp-pdb.lo pygimp-tile.lo pygimp-vectors.lo ../../libgimp/libgimp-2.0.la ../../libgimpcolor/libgimpcolor-2.0.la ../../libgimpbase/libgimpbase-2.0.la ../../libgimp/libgimpui-2.0.la -L/opt/local/lib -lgobject-2.0 -lglib-2.0 -lintl -Wl,-framework -Wl,CoreFoundation -L/opt/local/lib -lgegl-0.4 -lgegl-npd-0.4 -lm -lgmodule-2.0 -ljson-glib-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl -Wl,-framework -Wl,CoreFoundation -lbabl-0.1   -ljpeg 
libtool: link: /usr/bin/nm -p  .libs/gimpmodule.o .libs/pygimp-item.o .libs/pygimp-display.o .libs/pygimp-drawable.o .libs/pygimp-image.o .libs/pygimp-parasite.o .libs/pygimp-pdb.o .libs/pygimp-tile.o .libs/pygimp-vectors.o   |  | /opt/local/bin/gsed 's/.* //' | sort | uniq > .libs/gimp.exp
../../libtool: eval: line 1734: syntax error near unexpected token `|'
../../libtool: eval: line 1734: `/usr/bin/nm -p  .libs/gimpmodule.o .libs/pygimp-item.o .libs/pygimp-display.o .libs/pygimp-drawable.o .libs/pygimp-image.o .libs/pygimp-parasite.o .libs/pygimp-pdb.o .libs/pygimp-tile.o .libs/pygimp-vectors.o   |  | /opt/local/bin/gsed 's/.* //' | sort | uniq > .libs/gimp.exp'
make[4]: *** [gimp.la] Error 1

Attachments (2)

gimp_gimpdisplayshell-draw_c.diff (596 bytes) - added by rmottola (Riccardo) 5 years ago.
retina patch
main.log (3.1 MB) - added by rmottola (Riccardo) 5 years ago.
build log

Change History (11)

Changed 5 years ago by rmottola (Riccardo)

retina patch

Changed 5 years ago by rmottola (Riccardo)

Attachment: main.log added

build log

comment:1 Changed 5 years ago by kencu (Ken)

That error occurs when NM is too old. You need to force the newer one from cctools.

Last edited 5 years ago by kencu (Ken) (previous) (diff)

comment:2 Changed 5 years ago by mf2k (Frank Schima)

In the future, please add the port maintainer(s) to Cc (port info --maintainers gimp2), if any.

comment:3 Changed 5 years ago by mf2k (Frank Schima)

Owner: set to dbevans
Status: newassigned

comment:4 Changed 5 years ago by rmottola (Riccardo)

how can I force it? does it need to be done in the recipe or can I do it from the command line to see if my patches are enough and gimp builds/works with them.

comment:5 Changed 5 years ago by kencu (Ken)

usually you set a configure and/or build env variable for NM, just like you would for CXX.

for autotools you can set one of those ac_cv_xxxx env vars they use, which you find in the configure log after your failed build attempt.

cmake and qmake are different; you pass it in as a configure arg or similar.

for some builds, you need to patch the Makefile or configure script.

for your own machine "right now" you can symlink the newer one into the old one's location, but save the old one and undo it after your test and fix it properly or nobody will be able to reproduce your build.

I think gimp uses autotools, so that is generally fairly directable.

comment:6 Changed 5 years ago by rmottola (Riccardo)

I added this to my Portfile (the NM part):

configure.env       CC_FOR_BUILD=${configure.cc} \
                    NM=/opt/local/bin/nm

and it built (together with a small patch)

However, I need to force clang as a compiler. GCC 6, which would be selected by default, has an issue with code because std99 is not enabled, so "int i" inside the for declaration is not accepted. So either you enable it somehow... or try clang which probably enables it by default.

comment:7 Changed 3 years ago by mascguy (Christopher Nielsen)

Riccardo, is this still an issue?

comment:8 Changed 2 years ago by mascguy (Christopher Nielsen)

Owner: changed from dbevans to mascguy

comment:9 Changed 20 months ago by mascguy (Christopher Nielsen)

Resolution: worksforme
Status: assignedclosed

No response over the past 15 months, closing.

If this is still relevant, please reopen.

Note: See TracTickets for help on using tickets.