Re: Fix aarch64 build on embree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2022-06-29 02:05, Petr Pisar wrote:
V Tue, Jun 28, 2022 at 07:08:31PM -0700, Luya Tshimbalanga napsal(a):
Hello team,

What is the way to disable `-mss2 for aarch64 build in embree?

Spec file:
https://src.fedoraproject.org/rpms/embree/blob/rawhide/f/embree.spec

Scratch build result:
https://koji.fedoraproject.org/koji/taskinfo?taskID=88867571

Are you sure your scratch build corresponds to the linked spec file?

The spec file reads:

    %ifarch x86_64
            -DEMBREE_MAX_ISA=SSE4.2 \
    %else
            -DEMBREE_MAX_ISA=NONE \
    %endif

but the build.log shows:

    + /usr/bin/cmake -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_LIBDIR=/usr/lib64 -DCMAKE_INSTALL_PREFIX=/usr -DEMBREE_COMPACT_POLYS=ON -DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF -DEMBREE_ISPC_SUPPORT=ON -DEMBREE_MAX_ISA=DEFAULT -DEMBREE_TUTORIALS=OFF

There is -DEMBREE_MAX_ISA=DEFAULT instead of -DEMBREE_MAX_ISA=NONE.
My bad, I should attach the updated spec file yet to get pushed in the repository. Here is below.
Morover, I'm not sure whether upstream supports a generic AArch64. README.md
reads:

    Embree requires at least an x86 CPU with support for
    SSE2 or an Apple M1 CPU.

-- Petr



-- 
Luya Tshimbalanga
Fedora Design Team
Fedora Design Suite maintainer
%global __cmake_in_source_build 1

%global		with_snapshot	0
%global		with_examples	0
#%%global		prerelease	beta
#%%global		commit		40b9aca2668f443cae6bfbfa7cc5a354f1087011
#%%global		shortcommit	%%(c=%%{commit}; echo ${c:0:7})
%ifarch x86_64 aarch64
%bcond_without  ispc
%else
%bcond_with     ispc
%endif

Name:		embree
Version:	3.13.4
Release:	%autorelease
Summary:	Collection of high-performance ray tracing kernels

License:	ASL 2.0
URL:		https://embree.github.io
%if %{with_snapshot}
Source:		https://github.com/%{name}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz#/%{name}-%{version}-%{shortcommit}.tar.gz
%else
Source:		https://github.com/%{name}/%{name}/archive/v%{version}%{?prerelease:%{-prerelease}.0}.tar.gz#/%{name}-%{version}%{?prerelease:-%{prerelease}.0}.tar.gz
%endif

BuildRequires:	cmake
BuildRequires:	gcc-c++
BuildRequires:	giflib-devel
%if %{with ispc} 
BuildRequires:	ispc
%endif
BuildRequires:	pkgconfig(glut)
BuildRequires:	pkgconfig(glfw3)
BuildRequires:	pkgconfig(xmu)
# Optional dependencies needed for examples
%if %{with_examples}
BuildRequires:	pkgconfig(libjpeg)
BuildRequires:	pkgconfig(libopenjp2)
BuildRequires:	pkgconfig(libpng)
BuildRequires:	pkgconfig(libtiff-4)
BuildRequires:	pkgconfig(OpenImageIO)
%endif
BuildRequires:	pkgconfig(tbb)

# Exclude architectures failing to support SSE2 and up
ExcludeArch:	armv7hl i686 ppc64le s390x

%description
A collection of high-performance ray tracing kernels intended to graphics 
application engineers that want to improve the performance of their application.

%package	devel
Summary:	Development files for %{name}
Requires:	%{name}%{?_isa} = %{version}-%{release}

%description	devel
The %{name}-devel package contains libraries and header files for
 applications that use %{name}.

%if %{with_examples}
%package	examples
Summary:	Example of application using %{name}
Requires:	%{name}%{?_isa} = %{version}-%{release}

%description	examples
The %{name}-examples package contains sample binaries using %{name}.
%endif

%prep
%if %{with_snapshot}
%autosetup -n %{name}-%{commit}
%else 
%autosetup -n %{name}-%{version}%{?prerelease:-%{prerelease}.0}
%endif

%build
export CXXFLAGS="%{optflags} -Wl,--as-needed"
%cmake \
	-DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_CXX_STANDARD=17 \
	-DCMAKE_INSTALL_LIBDIR=%{_libdir} \
	-DCMAKE_INSTALL_PREFIX=%{_prefix} \
	-DEMBREE_COMPACT_POLYS=ON \
	-DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF \
%if %{with ispc}
        -DEMBREE_ISPC_SUPPORT=ON \
%else
        -DEMBREE_ISPC_SUPPORT=OFF \
%endif
        -DEMBREE_MAX_ISA=DEFAULT \
	-DEMBREE_TUTORIALS=OFF 
%cmake_build

%install
%cmake_install

# Relocate doc files
mv %{buildroot}%{_docdir}/%{name}3 %{buildroot}%{_docdir}/%{name}
rm %{buildroot}%{_docdir}/%{name}/LICENSE.txt

%files
%license LICENSE.txt
%doc README.md CHANGELOG.md readme.pdf third-party-programs-TBB.txt third-party-programs.txt
%{_libdir}/lib%{name}3.so.3
%{_libdir}/lib%{name}3.so.3.*
%{_mandir}/man3/*

%files devel
%{_libdir}/lib%{name}3.so
%{_includedir}/%{name}3/
%{_libdir}/cmake/%{name}-%{version}/

%if %{with_examples}
%files examples
%{_bindir}/%{name}3/*
%endif

%changelog
%autochangelog
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux