New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #25107 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

texlive_base doesn't fully support changing build_arch

Reported by: elebel@… Owned by: dports@…
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc: ryandesign@…
Port: texlive_base

Description (last modified by ryandesign@…) (diff)

Hi There,

I needed to compile libzzip with

sudo port -f install libzzip +universal

and got this error:

[...]

--->  Building texlive_base
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_tex_texlive_base/work/texlive_base-2007" && /usr/bin/make all " returned error 2
Command output: 	      -isystem/opt/local/include   -O2 -arch i386 yesno.c -o yesno.o
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -DHAVE_NCURSES -DUSE_COLORS -DLIBDIR=\"/opt/local/lib\" -DINCLUDEDIR=\"/opt/local/include\" -c -I. -I. \
	      -isystem/opt/local/include   -O2 -arch i386 radiolist.c -o radiolist.o
radiolist.c: In function 'dialog_radiolist':
radiolist.c:312: warning: format not a string literal and no format arguments
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -DHAVE_NCURSES -DUSE_COLORS -DLIBDIR=\"/opt/local/lib\" -DINCLUDEDIR=\"/opt/local/include\" -c -I. -I. \
	      -isystem/opt/local/include   -O2 -arch i386 gauge.c -o gauge.o
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -DHAVE_NCURSES -DUSE_COLORS -DLIBDIR=\"/opt/local/lib\" -DINCLUDEDIR=\"/opt/local/include\" -c -I. -I. \
	      -isystem/opt/local/include   -O2 -arch i386 rc.c -o rc.o
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -DHAVE_NCURSES -DUSE_COLORS -DLIBDIR=\"/opt/local/lib\" -DINCLUDEDIR=\"/opt/local/include\" -c -I. -I. \
	      -isystem/opt/local/include   -O2 -arch i386 strcasecmp.c -o strcasecmp.o
/usr/bin/gcc-4.2 -L/opt/local/lib dialog.o checklist.o inputbox.o menubox.o msgbox.o textbox.o yesno.o radiolist.o gauge.o rc.o strcasecmp.o -o dialog -lncurses
ld: warning: in dialog.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in checklist.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in inputbox.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in menubox.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in msgbox.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in textbox.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in yesno.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in radiolist.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in gauge.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in rc.o, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in strcasecmp.o, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols:
  "_main", referenced from:
      start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [dialog] Error 1
make: *** [all] Error 1

Error: The following dependencies failed to build: xmlto texlive texlive_base
Error: Status 1 encountered during processing.
Before reporting a bug, first run the command again with the -d flag to get complete output.

that package links by default 64 bits even tough every .o file were compile i386. To fix this I had to change every Makefiles and add -arch i386 to the linker flags when there and add the same thing to every other lines when the compiler linked something (line with a -o in it)....arrrggg....

This should be fix cause, now, since it compiled, all the makefiles I changed are gone...

I'm sure this probleme is in other relatively old package too...

Change History

comment:1 Changed 3 years ago by macsforever2000@…

  • Keywords i386 removed
  • Port set to texlive_base

comment:2 Changed 3 years ago by ryandesign@…

  • Cc ryandesign@… added
  • Description modified (diff)

libzzip is definitely unrelated. If anything, you appear to be having trouble building texlive_base.

What is build_arch set to in macports.conf? What about universal_archs? What kind of Mac is this exactly, what processor? I assume it's a 64-bit Intel processor?

You should not be in the habit of using the force ("-f") flag.

comment:3 Changed 3 years ago by elebel@…

I set the build to i386 by setting build_arch i386 in /opt/local/etc/macports/macports.conf.

build_arch              i386          // simply uncomment this one

universal_archs         x86_64 i386   // didn't touch that one...

I'm compiling on a core i7 Macbook Pro.

I used the -f cause otherwise it wouldn't compile at all. Sorry I don't have the console error anymore.

comment:4 Changed 3 years ago by ryandesign@…

  • Summary changed from libzzip and i386 compile still links 64 bits. to texlive_base doesn't fully support changing build_arch

I am able to reproduce this problem building texlive_base if build_arch is set to i386 on a 64-bit machine running Snow Leopard. Most of the objects get built i386, but these don't:

$ find . -name '*.o' | xargs lipo -info | grep -v i386
Non-fat file: ./texk/web2c/cmaps.o is architecture: x86_64
Non-fat file: ./texk/web2c/FontTableCache.o is architecture: x86_64
Non-fat file: ./texk/web2c/XeTeXFontInst.o is architecture: x86_64
Non-fat file: ./texk/web2c/XeTeXFontInst_FT2.o is architecture: x86_64
Non-fat file: ./texk/web2c/XeTeXFontMgr.o is architecture: x86_64
Non-fat file: ./texk/web2c/XeTeXFontMgr_FC.o is architecture: x86_64
Non-fat file: ./texk/web2c/XeTeXLayoutInterface.o is architecture: x86_64
Non-fat file: ./texk/web2c/XeTeXOTLayoutEngine.o is architecture: x86_64
Non-fat file: ./texk/web2c/XeTeXOTMath.o is architecture: x86_64

comment:5 Changed 3 years ago by jmr@…

  • Owner changed from macports-tickets@… to dports@…

Is this still a problem with texlive-bin @2009_2?

comment:6 Changed 3 years ago by dports@…

  • Status changed from new to closed
  • Resolution set to fixed

Seems fixed. +atsui forces it to build 32-bit, and all binaries produced are i386.

I did have to put in a patch or two to the makefiles/autoconf stuff to fix a similar-looking problem (though with different files)

Note: See TracTickets for help on using tickets.