Bug 148096 - emulators/linux_base-* can not be built from ports on amd64
Summary: emulators/linux_base-* can not be built from ports on amd64
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Mark Linimon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-24 01:20 UTC by cwf-ml
Modified: 2015-03-14 16:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cwf-ml 2010-06-24 01:20:02 UTC
all linux_base_f* packages fail early in the package build when trying
to install from source:

Example:
===============================================================
libtool: compile:  cc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../src/liblzma/api -I../../src/liblzma/common -I../../src/liblzma/check -I../../src/liblzma/lz -I../../src/liblzma/rangecoder -I../../src/liblzma/lzma -I../../src/liblzma/subblock -I../../src/liblzma/delta -I../../src/liblzma/simple -I../../src/common -O2 -fno-strict-aliasing -pipe -MT liblzma_la-crc32_x86.lo -MD -MP -MF .deps/liblzma_la-crc32_x86.Tpo -c check/crc32_x86.S  -fPIC -DPIC -o .libs/liblzma_la-crc32_x86.o
check/crc32_x86.S: Assembler messages:
check/crc32_x86.S:96: Error: suffix or operands invalid for `push'
check/crc32_x86.S:97: Error: suffix or operands invalid for `push'
check/crc32_x86.S:98: Error: suffix or operands invalid for `push'
check/crc32_x86.S:99: Error: suffix or operands invalid for `push'
check/crc32_x86.S:100: Error: `0x14(%esp)' is not a valid 64 bit base/index expression
check/crc32_x86.S:101: Error: `0x18(%esp)' is not a valid 64 bit base/index expression
check/crc32_x86.S:102: Error: `0x1C(%esp)' is not a valid 64 bit base/index expression
check/crc32_x86.S:131: Internal error, aborting at /usr/src/gnu/usr.bin/binutils/as/../../../../contrib/binutils/gas/config/tc-i386.c line 3483 in output_imm
Please report this bug.
*** Error code 1
libtool: compile:  cc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../src/liblzma/api -I../../src/liblzma/common -I../../src/liblzma/check -I../../src/liblzma/lz -I../../src/liblzma/rangecoder -I../../src/liblzma/lzma -I../../src/liblzma/subblock -I../../src/liblzma/delta -I../../src/liblzma/simple -I../../src/common -D_THREAD_SAFE -pthread -fvisibility=hidden -Wall -Wextra -Wformat=2 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -O2 -fno-strict-aliasing -pipe -MT liblzma_la-crc32_table.lo -MD -MP -MF .deps/liblzma_la-crc32_table.Tpo -c check/crc32_table.c -o liblzma_la-crc32_table.o >/dev/null 2>&1
mv -f .deps/liblzma_la-crc32_table.Tpo .deps/liblzma_la-crc32_table.Plo
1 error
*** Error code 1
1 error
*** Error code 1
1 error
*** Error code 1
1 error
*** Error code 2
1 error
*** Error code 1

Stop in /usr/ports/archivers/xz.
*** Error code 1

Stop in /usr/ports/devel/libtool22.
*** Error code 1

Stop in /usr/ports/archivers/rpm.
*** Error code 1

Stop in /usr/ports/emulators/linux_base-f9.
===============================================================

Fix: 

installation via pkg_add -r works
How-To-Repeat: - install FreeBSD-7.3-RELEASE
- cvsup ports tree to now
- put linux_enable="YES" into /etc/rc.conf
- reboot system
sysctl compat.linux.osrelease=2.6.16
cd /usr/ports/emulators/linux_base-f9
make

Same problem eixsts with at least 4 other linux_base-* ports I have
tested (f8, f10, fc4)
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2010-06-24 21:25:36 UTC
Responsible Changed
From-To: freebsd-ports-bugs->naddy

This is actually a problem with dependent port archivers/xz.
Comment 2 Christian Weisgerber 2010-06-24 21:56:21 UTC
> libtool: compile:  cc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..
> -I../../src/liblzma/api -I../../src/liblzma/common
> -I../../src/liblzma/check -I../../src/liblzma/lz
> -I../../src/liblzma/rangecoder -I../../src/liblzma/lzma
> -I../../src/liblzma/subblock -I../../src/liblzma/delta
> -I../../src/liblzma/simple -I../../src/common -O2 -fno-strict-aliasing
> -pipe -MT liblzma_la-crc32_x86.lo -MD -MP -MF
> .deps/liblzma_la-crc32_x86.Tpo -c check/crc32_x86.S  -fPIC -DPIC -o
> .libs/liblzma_la-crc32_x86.o

This should not happen.  crc32_x86.S should only be built on i386,
not on amd64.

What does the configure test
  checking if assembler optimizations should be used...
report as result?

I cannot reproduce this behavior on 7.3-STABLE/amd64.


Note: I'll be mostly away until July 5.

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de
Comment 3 cwf-ml 2010-06-25 17:15:13 UTC
Hello,

On 24.06.2010 22:56, Christian Weisgerber wrote:
> This should not happen.  crc32_x86.S should only be built on i386,
> not on amd64.
>
> What does the configure test
>   checking if assembler optimizations should be used...
> report as result?

I still maintain this bug is probably not with your port, and therefore
it should be reassgned to the real culprit :-)

Case in point:

When I try to make clean all from /usr/ports/archivers/xz then everything
works fine:

===>  Patching for xz-4.999.9_1
===>  Applying FreeBSD patches for xz-4.999.9_1
===>  Configuring for xz-4.999.9_1

XZ Utils 4.999.9beta

System type:
checking build system type... x86_64-portbld-freebsd7.3
checking host system type... x86_64-portbld-freebsd7.3

Configure options:
checking if debugging code should be compiled... no
checking which encoders to build... lzma1 lzma2 delta x86 powerpc ia64 arm
armthumb sparc
checking which decoders to build... lzma1 lzma2 delta x86 powerpc ia64 arm
armthumb sparc
checking which match finders to build... hc3 hc4 bt2 bt3 bt4
checking which integrity checks to build... crc32 crc64 sha256
checking if assembler optimizations should be used... x86_64
checking if unaligned memory access should be used... yes
checking if small size is preferred over speed... no
checking if threading support is wanted... yes
checking how programs should be linked against liblzma... dynamically
[...]
Making all in scripts
Making all in po
Making all in tests


But when the xz build is called from the linux_base-f9 build it looks different:

[...]
===>   libtool-2.2.6b depends on file: /usr/local/bin/xz - not found
===>    Verifying install for /usr/local/bin/xz in /usr/ports/archivers/xz
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
===>  Extracting for xz-4.999.9_1
=> MD5 Checksum OK for xz-4.999.9beta.tar.gz.
=> SHA256 Checksum OK for xz-4.999.9beta.tar.gz.
===>  Patching for xz-4.999.9_1
===>  Applying FreeBSD patches for xz-4.999.9_1
===>  Configuring for xz-4.999.9_1

XZ Utils 4.999.9beta

System type:
checking build system type... i386-portbld-freebsd7.3
checking host system type... i386-portbld-freebsd7.3

Configure options:
checking if debugging code should be compiled... no
checking which encoders to build... lzma1 lzma2 delta x86 powerpc ia64 arm
armthumb sparc
checking which decoders to build... lzma1 lzma2 delta x86 powerpc ia64 arm
armthumb sparc
checking which match finders to build... hc3 hc4 bt2 bt3 bt4
checking which integrity checks to build... crc32 crc64 sha256
checking if assembler optimizations should be used... x86
checking if unaligned memory access should be used... yes
checking if small size is preferred over speed... no
checking if threading support is wanted... yes
checking how programs should be linked against liblzma... dynamically
[...]

So ... somemthing is broken here - either the ports system itself or the way
the linux_base-* ports use it.

As for your question, the configure test reacts differently:

when called from /usr/ports/archivers/xz

	checking if assembler optimizations should be used... x86_64

when called from /usr/ports/emulators/linux_base-f9

	checking if assembler optimizations should be used... x86

Regards

Cristoph Weber-Fahr
Comment 4 Christian Weisgerber freebsd_committer freebsd_triage 2010-07-11 17:36:06 UTC
Responsible Changed
From-To: naddy->freebsd-emulation

This is indeed a problem with emulators/linux_base-*.  These ports 
set ARCH=i386 on amd64.  This value of ARCH is then passed on 
recursively when a dependency is installed, which then uses 
CONFIGURE_TARGET=i386-portbld-freebsd${OSREL}, causing problems on 
amd64.
Comment 5 Edwin Groothuis freebsd_committer freebsd_triage 2010-09-14 19:48:53 UTC
Responsible Changed
From-To: freebsd-emulation->naddy

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 6 Christian Weisgerber freebsd_committer freebsd_triage 2010-09-18 16:21:00 UTC
Responsible Changed
From-To: naddy->freebsd-emulation

Tweak synopsis and assign back to freebsd-emulation.
Comment 7 Mark Linimon freebsd_committer freebsd_triage 2014-03-24 05:06:50 UTC
State Changed
From-To: open->feedback

By now this is a very old PR.  To submitter: is it still relevant? 


Comment 8 Mark Linimon freebsd_committer freebsd_triage 2014-03-24 05:06:50 UTC
Responsible Changed
From-To: freebsd-emulation->linimon