Bug 194874 - devel/libatomic_ops unbuildable -- 'xmmintrin.h' file not found
Summary: devel/libatomic_ops unbuildable -- 'xmmintrin.h' file not found
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Rodrigo Osorio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-07 02:55 UTC by Chris Hutchinson
Modified: 2015-01-28 17:42 UTC (History)
2 users (show)

See Also:
portmaster: maintainer-feedback? (rodrigo)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Hutchinson 2014-11-07 02:55:31 UTC
Recent fresh install on 11-CURRENT
uname 11-CURRENT #1 r274134 amd64 Nov 5 12:56:14 PST 2104
svn info /usr/ports Revision: 372176

Given the above, and lang/gcc-48 installed, libatomic_ops fails to
build, with the following output:

Making all in src
/usr/bin/make  all-am
/bin/sh ../libtool  --tag=CC    --mode=compile cc -DHAVE_CONFIG_H    -I../src -I
../src   -fPIC -Wall -Wextra -O2 -pipe  -fstack-protector -fno-strict-aliasing -
MT atomic_ops.lo -MD -MP -MF .deps/atomic_ops.Tpo -c -o atomic_ops.lo atomic_ops
.c
libtool: compile:  cc -DHAVE_CONFIG_H -I../src -I../src -fPIC -Wall -Wextra -O2
-pipe -fstack-protector -fno-strict-aliasing -MT atomic_ops.lo -MD -MP -MF .deps
/atomic_ops.Tpo -c atomic_ops.c -o atomic_ops.o
In file included from atomic_ops.c:73:
../src/atomic_ops/sysdeps/standard_ao_double_t.h:31:11: fatal error:
      'xmmintrin.h' file not found
# include <xmmintrin.h>
          ^
1 error generated.
*** Error code 1

Stop.

I've checked, gcc-48 is announced as in the $PATH, and I am able to
find the offending file (xmmintrin.h) in it's include tree (gcc-48).

What must be done to make this port build?

Thank you for all your time, and consideration.

--Chris
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-11-07 02:55:31 UTC
Auto-assigned to maintainer rodrigo@FreeBSD.org
Comment 2 Rodrigo Osorio freebsd_committer freebsd_triage 2014-11-11 00:20:44 UTC
I do the test with a fresh 11.0-CURRENT and gcc48 from pkg, and libatomic_ops compiles without problem. Maye a side effect ?

Can you give more information about your issue ?
btw can you ass your /etc/make.conf file ?
Comment 3 Chris Hutchinson 2014-11-11 00:33:35 UTC
(In reply to Rodrigo Osorio from comment #2)
> I do the test with a fresh 11.0-CURRENT and gcc48 from pkg, and
> libatomic_ops compiles without problem. Maye a side effect ?
> 
> Can you give more information about your issue ?
> btw can you ass your /etc/make.conf file ?

Greetings, and thank you for your attention to this.

For the record it was a fresh install of 11, 5 days ago.
I built a custom kernel, and built/installed kernel/world
with the following:

src.conf(5)
WITHOUT_CLANG=true

make.conf(5)
FAVORITE_COMPILER=gcc

following the installation of kernel, and world. I installed
lang/perl (5.18), and lang/gcc-48. I then cd'd to x11/xorg-minimal.
Then attempted make. Which ultimately failed. The port failed
with the complaint I started this pr(1) with.

Does this help? Is this what you needed?

Thank you.
--Chris
Comment 4 Rodrigo Osorio freebsd_committer freebsd_triage 2014-11-26 21:20:19 UTC
Follow your guidelines but can't reproduce the issue
Comment 5 johnllyon 2015-01-27 16:08:59 UTC
I am getting this same bug on FreeBSD 10.1-p4.  I did a Google search and found this bug report, so I'm adding to this Bug Report instead of creating my own.

I do NOT have gcc installed and am instead running clang as my sole compiler.  Updating dbus from 1.8.12 to 1.8.12_1 caused the devel/libatomic_ops to be added to my system as a dependency of dbus.  Installing the package for version 7.3.a2 works as expected.  However, when upgrading my installed ports with portmaster from version 7.3.a2 to 7.4.0_1, the build fails with the following error:

In file included from atomic_ops.c:73:
../src/atomic_ops/sysdeps/standard_ao_double_t.h:31:11: fatal error: 'xmmintrin.                                                                             h' file not found
# include <xmmintrin.h>
          ^
1 error generated.
*** [atomic_ops.lo] Error code 1

make[4]: stopped in /usr/ports/devel/libatomic_ops/work/libatomic_ops-7.4.0/src
--- atomic_ops_stack.lo ---
mv -f .deps/atomic_ops_stack.Tpo .deps/atomic_ops_stack.Plo
--- atomic_ops_malloc.lo ---
mv -f .deps/atomic_ops_malloc.Tpo .deps/atomic_ops_malloc.Plo
1 error

make[4]: stopped in /usr/ports/devel/libatomic_ops/work/libatomic_ops-7.4.0/src
*** [all] Error code 2

make[3]: stopped in /usr/ports/devel/libatomic_ops/work/libatomic_ops-7.4.0/src
1 error

make[3]: stopped in /usr/ports/devel/libatomic_ops/work/libatomic_ops-7.4.0/src
*** [all-recursive] Error code 1

make[2]: stopped in /usr/ports/devel/libatomic_ops/work/libatomic_ops-7.4.0
1 error

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

Stop.
make[1]: stopped in /usr/ports/devel/libatomic_ops
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/libatomic_ops

===>>> make build failed for devel/libatomic_ops
===>>> Aborting update

===>>> Update for devel/libatomic_ops failed
===>>> Aborting update


===>>> You can restart from the point of failure with this command line:
       portmaster <flags> devel/libatomic_ops

My /etc/make.conf file specifies:

CPUTYPE?=athlon64-sse3
WITHOUT="X11"
WITH_PKGNG="YES"

I can provide additional information upon request.  Just let me know what you need.
Comment 6 Rodrigo Osorio freebsd_committer freebsd_triage 2015-01-27 17:13:16 UTC
@johnllyon : I found xmmintrin.h in my /usr/include, what about you ?
Comment 7 johnllyon 2015-01-27 17:54:55 UTC
Strange.  That file is missing from /usr/include.  Nor have I removed that file from my system manually. Some other process must have removed that file.  Any ideas on what would have caused this to happen?  Other than upgrading some ports with portmaster, the only other changes I have made recently were those resulting from running freebsd-update (which I ran a few weeks ago for the openssl vulnerability).  Also, any ideas on how to fix this problem?
Comment 8 johnllyon 2015-01-28 17:27:23 UTC
So I do have the xmmintrin.h installed on system, but it's not in the /usr/include directory.  It's located in /usr/src.

Could the problem be that the port is unable to find the library file if it's located in /usr/src?

find /usr/src -name xmmintrin.h
/usr/src/contrib/gcc/config/i386/xmmintrin.h
/usr/src/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h
Comment 9 johnllyon 2015-01-28 17:42:34 UTC
I also found xmmintrin.h in /usr/include/clang/3.3/, so it appears that the appropriate header is available, but is just unable to be found by the compiler for some weird reason.