Bug 214512 - audio/linux-skype_oss_wrapper: gcc provided by CentOS is too old to understand some valid CPUTYPE
Summary: audio/linux-skype_oss_wrapper: gcc provided by CentOS is too old to understan...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
URL:
Keywords:
: 214513 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-11-14 18:38 UTC by Ting-Wei Lan
Modified: 2019-04-30 16:34 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (avos)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ting-Wei Lan 2016-11-14 18:38:59 UTC
I set CPUTYPE=corei7 in /etc/make.conf, and the value is converted to -march=nehalem by Makefiles installed on FreeBSD 11.0-RELEASE. CentOS 6 uses gcc 4.4 and CentOS 7 uses gcc 4.8, but this option is only supported on gcc >= 4.9, which can cause build failure for audio/linux-skype_oss_wrapper. This problem also happens in native FreeBSD gcc (gcc 4.8) and a bug (bug 214173) is already filed for the native port.

===>  Building for linux-skype_oss_wrapper-0.1.1
/compat/linux/usr/bin/gcc -O2 -pipe -march=corei7  -fstack-protector -fno-strict-aliasing -m32 -fPIC -c libpulse.c -o libpulse.o
libpulse.c:1: error: bad value (corei7) for -march= switch
libpulse.c:1: error: bad value (corei7) for -mtune= switch
*** Error code 1
Comment 1 Andriy Voskoboinyk freebsd_committer freebsd_triage 2016-12-08 19:42:02 UTC
Reassign; this is a toolchain issue.
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-01-14 00:37:47 UTC
Is this still relevant?
Comment 3 Ting-Wei Lan 2018-01-14 07:25:30 UTC
(In reply to w.schwarzenfeld from comment #2)
Yes, it is easy to reproduce the problem.

# make __MAKE_CONF=/dev/null CPUTYPE=corei7 BATCH=1
===>  License BSD3CLAUSE accepted by the user
===>   linux-skype_oss_wrapper-0.1.1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by linux-skype_oss_wrapper-0.1.1 for building
===>  Extracting for linux-skype_oss_wrapper-0.1.1
=> SHA256 Checksum OK for s3erios-skype_oss_wrapper-v0.1.1_GH0.tar.gz.   
===>  Patching for linux-skype_oss_wrapper-0.1.1
===>   linux-skype_oss_wrapper-0.1.1 depends on package: linux-c6-devtools>0 - found
===>  Configuring for linux-skype_oss_wrapper-0.1.1
===>  Building for linux-skype_oss_wrapper-0.1.1
--- skype_oss ---
--- libpulse.o ---
--- skype_oss ---
echo "#!/bin/sh" > skype_oss && echo "LD_LIBRARY_PATH=/compat/linux/lib/skype_oss_wrapper:\$LD_LIBRARY_PATH skype" >> skype_oss && chmod +x skype_oss
--- libpulse.o ---
/compat/linux/usr/bin/gcc -O2 -pipe -march=corei7  -fstack-protector -fno-strict-aliasing -m32 -fPIC -c libpulse.c -o libpulse.o
libpulse.c:1: error: bad value (corei7) for -march= switch
libpulse.c:1: error: bad value (corei7) for -mtune= switch
*** [libpulse.o] Error code 1

make[1]: stopped in /usr/ports/audio/linux-skype_oss_wrapper/work/skype_oss_wrapper-0.1.1
1 error

make[1]: stopped in /usr/ports/audio/linux-skype_oss_wrapper/work/skype_oss_wrapper-0.1.1
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/audio/linux-skype_oss_wrapper
Comment 4 Tijl Coosemans freebsd_committer freebsd_triage 2018-01-16 18:12:57 UTC
There's not much we can do about this.  We could completely disable CPUTYPE in this port, but that seems wrong.  I suggest you add something like this to your /etc/make.conf instead.

.if ${.CURDIR:M/usr/ports/audio/linux-skype_oss_wrapper*}
CPUTYPE=somethingthatdoeswork
.endif

Or maybe use .if ${CC:M/compat/linux/*}
Comment 5 Tijl Coosemans freebsd_committer freebsd_triage 2018-01-16 18:17:29 UTC
*** Bug 214513 has been marked as a duplicate of this bug. ***
Comment 6 Ting-Wei Lan 2018-01-17 09:48:59 UTC
Yes, I already have similar things in /etc/make.conf:

CPUTYPE=        corei7

.if ${.CURDIR:M*/*/linux-*}
CPUTYPE=
.endif

.if ${.CURDIR:M*/lang/gcc48*}
CPUTYPE=
CFLAGS+=        -march=corei7
.endif

I opened this bug because it looks like a workaround. If we are not going to fix it, I think this bug can be closed.
Comment 7 Tijl Coosemans freebsd_committer freebsd_triage 2018-01-17 10:04:53 UTC
I'll leave it open for now.  Support to build Linux packages could be added somewhere under Mk/ and then correcting of CPUTYPE could be part of that as well.
Comment 8 Tobias Kortkamp freebsd_committer freebsd_triage 2019-04-30 16:34:17 UTC
Port removed in ports r500506.