Opened 14 years ago
Closed 13 years ago
#29207 closed defect (fixed)
xsane 0.998 will not build because of -arch flags from sane-config
Reported by: | mtessi20@… | Owned by: | mklein-de (Michael Klein) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.9.2 |
Keywords: | Cc: | aguynamedryan+sane@…, drkp (Dan Ports) | |
Port: | sane-backends xsane |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
in the process of installing gimp, xsane will not build. I have tried to install with -universal based on #29165, but no help. Tried :
sudo port selfupdate sudo port upgrade outdated sudo port clean xsane sudo port install xsane
No luck.
MAC OS 10.6.7, XCode 3.2.6
Part log here, full log attached
:info:build collect2: ld returned 1 exit status :info:build lipo: can't open input file: /var/tmp//ccak6kaC.out (No such file or directory) :info:build make[1]: *** [xsane] Error 1 :info:build make: *** [all-recursive] Error 1 :info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_xsane/work/xsane-0.998" && /usr/bin/make -j8 all " returned error 2 :error:build Target org.macports.build returned: shell command failed (see log for details) :debug:build Backtrace: shell command failed (see log for details) while executing "command_exec build" (procedure "portbuild::build_main" line 8) invoked from within "$procedure $targetname" :info:build Warning: the following items did not execute (for xsane): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Attachments (3)
Change History (20)
Changed 14 years ago by mtessi20@…
comment:1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Owner: | changed from macports-tickets@… to michael.klein@… |
Port: | xsane added |
comment:2 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to mtessi20@…:
I have tried to install with -universal based on #29165, but no help.
The log clearly shows you are building xsane with the universal variant. Try again without the universal variant, and if it fails again, attach that main.log.
sudo port clean xsane sudo port install xsane -universal
Changed 14 years ago by mtessi20@…
Attachment: | mainNoUniv.log added |
---|
install log with -universal flag
comment:3 Changed 14 years ago by mtessi20@…
Sorry, original log was from a later try without universal. I have attached the log when trying the clean followed by the non-universal install.
comment:4 Changed 14 years ago by mklein-de (Michael Klein)
Did you build sane-backends with the universal variant? If so, please try again with sane-backends -universal
.
What does sane-config --ldflags
say?
comment:5 Changed 14 years ago by mtessi20@…
Thank you for the reply. At this time, I an unable to pursue this matter further on my end due to a change of circumstances. Please close.
comment:6 Changed 14 years ago by mf2k (Frank Schima)
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:7 Changed 14 years ago by mklein-de (Michael Klein)
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Reopening, I can reproduce this, and I'm sure this issue will pop up again anyway.
xsane linking fails because sane-config --ldflags
returns both -arch x86_64
and -arch i386
when sane-backends +universal is installed.
So we can't build universal because of gimp2, but non-universal also fails with sane-backends +universal. What now?
- Hack xsane's Makefile to *not* use
sane-config --ldflags
- Declare
universal_variant no
for sane-backends by default
- Investigate what needs to be done to get gimp2 +universal working. At first glance it looks like disabling the universal variant goes back to when there were issues with boost +universal (due to gimp2->gegl->libopenraw->boost). This was apparently fixed in r58798 (#21408), so this might be just about removing some
universal_variant no
.
Obviously, 3. would be the preferred solution. I'm currently only on a G4 PowerBook here, so you probably understand I'm not that eager to rebuild gimp2 and all of its dependencies. Maybe somebody else has a couple of CPU cycles to spare and try?
comment:8 Changed 14 years ago by neverpanic (Clemens Lang)
It's probably disabled, because graphics/babl doesn't build universal (#20906). The error changed since the bug report, though, and now is:
/bin/sh ../libtool --silent --tag=CC --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -DLIBDIR=\""/opt/local/lib"\" -I.. -I../babl/base -I/opt/local/include -O2 -arch x86_64 -arch i386 -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wold-style-definition -c -o babl-cpuaccel.lo babl-cpuaccel.c babl-cpuaccel.c: In function 'arch_accel_intel': babl-cpuaccel.c:220: error: can't find a register in class 'BREG' while reloading 'asm' babl-cpuaccel.c:220: error: 'asm' operand has impossible constraints
So apparently it's not just removing universal_variant no.
comment:9 Changed 14 years ago by jmroot (Joshua Root)
Cc: | aguynamedryan+sane@… added |
---|---|
Port: | sane-backends added |
Summary: | xsane 0.998 will not build → xsane 0.998 will not build because of -arch flags from sane-config |
We generally remove -arch flags from -config scripts, .pc files and the like.
comment:10 Changed 14 years ago by aguynamedryan+macports@…
I was not able to recreate this problem. xsane builds and installs for me.
I just updated sane-backends to 1.0.22 (#29320), so it is possible this fixes the issue, though I am skeptical.
comment:11 Changed 14 years ago by mklein-de (Michael Klein)
sane-config 1.0.22 still prints multiple -arch flags here:
$ port installed sane-backends | grep active sane-backends @1.0.22_0+disable_localbackends+universal (active) $ sane-config --ldflags -L/opt/local/lib -L/opt/local/lib -arch i386 -arch ppc
comment:12 follow-up: 13 Changed 14 years ago by aguynamedryan+macports@…
I'm a little rusty on the whole "universal" issue, so I don't think I'll be much help on this ticket.
That said, here's my output:
$ port installed sane-backends | grep active sane-backends @1.0.22_0 (active) $ sane-config --ldflags -L/opt/local/lib -L/opt/local/lib -arch x86_64
comment:13 Changed 14 years ago by mklein-de (Michael Klein)
Replying to aguynamedryan+macports@…:
I'm a little rusty on the whole "universal" issue, so I don't think I'll be much help on this ticket.
That said, here's my output:
$ port installed sane-backends | grep active sane-backends @1.0.22_0 (active) $ sane-config --ldflags -L/opt/local/lib -L/opt/local/lib -arch x86_64
ok, so you don't have the universal variant of sane-backends installed. No problem here.
xsane doesn't build +universal because of its dependency on gimp2 (which is non-universal), However, if you have the universal variant of sane-backends installed, sane-config --ldflags
returns multiple -arch flags, and the linker tries to link a universal xsane binary.
If I understand jmr's comment above correctly, sane-backends should just remove the -arch flags from sane-config's output.
comment:14 follow-up: 15 Changed 14 years ago by jmroot (Joshua Root)
Apparently someone wrote a bit about this: PortfileRecipes
Changed 14 years ago by aguynamedryan+macports@…
Attachment: | sane-backends_1.0.22_1.patch added |
---|
Strip arch from sane-config and sane-backends.pc files
comment:15 Changed 14 years ago by aguynamedryan+macports@…
Replying to jmr@…:
I've taken a stab at it and submitted a patch for sane-backends' Portfile.
comment:17 Changed 13 years ago by drkp (Dan Ports)
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
xsane log file