Created attachment 237423 [details] arm-compute-library.shar Hi, i ported arm compute library
Created attachment 237453 [details] arm-computelibrary.shar I tedsted only on amd64 for aarch64 i need test. ====> Running Q/A tests (stage-qa) ====> Checking for pkg-plist issues (check-plist) ===> Parsing plist ===> Checking for items in STAGEDIR missing from pkg-plist ===> Checking for items in pkg-plist which are not in STAGEDIR ===> No pkg-plist issues found (check-plist) =>> Status devel/computelibrary | ComputeLibrary-22.08: package =>> Checking for staging violations... done =======================<phase: package >============================ ===> Building package for ComputeLibrary-22.08 =========================================================================== =>> Status devel/computelibrary | ComputeLibrary-22.08: install =>> Recording filesystem state for preinst... done =======================<phase: install >============================ ===> Installing for ComputeLibrary-22.08 ===> Checking if ComputeLibrary is already installed ===> Registering installation for ComputeLibrary-22.08 [freebsd13x64-default] Installing ComputeLibrary-22.08... =========================================================================== =>> Status devel/computelibrary | ComputeLibrary-22.08: deinstall =>> Checking shared library dependencies 0x0000000000000001 NEEDED Shared library: [libarm_compute.so] 0x0000000000000001 NEEDED Shared library: [libc.so.7] 0x0000000000000001 NEEDED Shared library: [libdl.so.1] 0x0000000000000001 NEEDED Shared library: [libgcc_s.so.1] 0x0000000000000001 NEEDED Shared library: [libm.so.5] 0x0000000000000001 NEEDED Shared library: [libstdc++.so.6] 0x0000000000000001 NEEDED Shared library: [libthr.so.3] =======================<phase: deinstall >============================ ===> Deinstalling for ComputeLibrary ===> Deinstalling ComputeLibrary-22.08 Updating database digests format: .......... done Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: ComputeLibrary: 22.08 Number of packages to be removed: 1 The operation will free 5 MiB. [freebsd13x64-default] [1/1] Deinstalling ComputeLibrary-22.08... [freebsd13x64-default] [1/1] Deleting files for ComputeLibrary-22.08: .......... done =========================================================================== =>> Checking for extra files and directories [00:02:58] Installing from package [freebsd13x64-default] Installing ComputeLibrary-22.08... [freebsd13x64-default] Extracting ComputeLibrary-22.08: .......... done [00:02:58] Cleaning up ===> Cleaning for ComputeLibrary-22.08 [00:02:58] Deinstalling package Updating database digests format: . done Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: ComputeLibrary: 22.08 Number of packages to be removed: 1
Created attachment 239489 [details] computelibrary.shar bump to 22.11
I'll try to have a look at it.
GH_PROJECT could be left out if equal to PORTNAME. for the architecture stuff, try SCONS_ARGS_amd64 neon=0 opencl=1 examples=1 arch=x86_64 SCONS_ARGS_aarch64= neon=1 opencl=0 examples=0 arch=arm64-v8a SCONS_ARGS_armv7= neon=1 opencl=0 examples=0 arch=armv7a SCONS_ARGS+= os=freebsd Werror=0 embed_kernels=0 build=native ${SCONS_ARGS_${ARCH}} This works even without including bsd.port.pre.mk. Could you provide an ONLY_FOR_ARCHS_REASON? Could the list of supported architectures be extended? Isn't Arm usually spelled ARM (in COMMENT)? Your patch to SConscript looks like the compiler name is not taken from the CC and CXX variables. Please check and perhaps adjust the port so it respects the CC and CXX variables. You can check this by e.g. installing llvm15 and then doing make CC=clang15 CXX=clang++15 to check if the build system actually picks these up. Apart from using a custom compiler, this is also used by Poudriere to cross-build with native-xtools. Will proceed with build test shortly.
(In reply to Robert Clausecker from comment #4) Also check if you could make building examples conditional on an EXAMPLES port options (cf. Porter's Handbook § 5.14.1.3). Please also check if perhaps upstream's own installation routine could be used so we don't miss any files in future updates of the port.
Please also clarify if the port is supposed to be devel/computelibrary or devel/arm-compute-library.
Port tested ok on armv7 arm64 FreeBSD 13.1. Please have a look at the issues raised in the other comments and we may be able to commit this one.
Created attachment 240166 [details] devel/computelibrary: build failure on amd64 FreeBSD 13.1 The build fails on amd64 FreeBSD 13.1. Please see attached log file: tests/framework/Framework.cpp:82:158: error: use of undeclared identifier 'OpenCLTimestamps' _available_instruments.emplace(std::pair<InstrumentType, ScaleFactor>(InstrumentType::OPENCL_TIMESTAMPS, ScaleFactor::NONE), Instrument::make_instrument<OpenCLTimestamps, ScaleFactor::NONE>); ^ (and hundreds more like this)
Created attachment 240597 [details] computelibrary.shar Update library to 23.02, Fix error: use of undeclared identifier 'OpenCLTimestamps'
Thank you for the update. Please also address the issues raised in the other comments. Will proceed with a build test shortly.
Created attachment 240600 [details] arm-compute-library.shar
Thank you for the update. What about the examples? (see comment #5) Is there a reason why they are only built on amd64? The usual convention is to have an option EXAMPLES conditionally on which examples are built. I'm not asking you to change this, just to explain your choice so I can understand the port better. I've also noticed that you have removed the ONLY_FOR_ARCHS bit. If you do so, please adapt the SCONS_ARGS bit with suitable default values for other architectures. E.g. you could do SCONS_ARGS_amd64= neon=0 opencl=1 examples=1 arch=x86_64 SCONS_ARGS_aarch64= neon=1 opencl=0 examples=0 arch=arm64-v8a SCONS_ARGS_armv7= neon=1 opencl=0 examples=0 arch=armv7a SCONS_ARGS_generic= ... SCONS_ARGS+= os=freebsd Werror=0 embed_kernels=0 build=native ${SCONS_ARGS_${ARCH}:U${SCONS_ARGS_generic}} I assume the bit about using the right CC and CXX is taken care of by USES=scons? Lastly, something that slipped by last time I reviewed your port: INSTALL_LIB is for installing shared libraries only. Use INSTALL_DATA for static libraries (cf. § 5.17.1 Porter's Handbook). This is because INSTALL_LIB possibly strips the library, which is fatal for static libraries. And instead of ${CP} -R, consider using COPYTREE_SHARE for installing the include files. I'll do a test run once my ports builder is free (currently processing some other patches).
Test build fails on i386 FreeBSD 13.1: g++12 -o build/utils/CommonGraphOptions.o -c -DARCH_ARM -Wextra -Wdisabled-optimization -Wformat=2 -Winit-self -Wstrict-overflow=2 -Wswitch-default -Woverloaded-virtual -Wformat-security -Wctor-dtor-privacy -Wsign-promo -Weffc++ -Wno-overlength-strings -Wall -std=c++14 -pedantic -Wlogical-op -Wnoexcept -Wstrict-null-sentinel -Wno-misleading-indentation -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -Wno-ignored-attributes -DENABLE_FP16_KERNELS -DENABLE_FP32_KERNELS -DENABLE_QASYMM8_KERNELS -DENABLE_QASYMM8_SIGNED_KERNELS -DENABLE_QSYMM16_KERNELS -DENABLE_INTEGER_KERNELS -DENABLE_NHWC_KERNELS -DENABLE_NCHW_KERNELS -fPIC -O3 -D_GLIBCXX_USE_NANOSLEEP -DARM_COMPUTE_CPP_SCHEDULER=1 -DENABLE_NEON -DARM_COMPUTE_ENABLE_NEON -DARM_COMPUTE_GRAPH_ENABLED -DARM_COMPUTE_OPENCL_ENABLED -DARM_COMPUTE_CL -Iinclude -I. -I. utils/CommonGraphOptions.cpp g++12: error: unrecognized command-line option '-mthumb' g++12: error: unrecognized command-line option '-mfpu=neon' g++12: error: unrecognized command-line option '-mfloat-abi=hard' Test build fails on amd64 FreeBSD 13.1: ====> Checking for pkg-plist issues (check-plist) ===> Parsing plist ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: include/BUILD.bazel ===> Checking for items in pkg-plist which are not in STAGEDIR ===> Error: Plist issues found. Will check arm64 later today.
Created attachment 240652 [details] arm-computelibrary.shar Added ${INSTALL_DATA} Added ${COPYTREE_SHARE} Added i386 arch, parameters
(In reply to Martin Filla from comment #14) Are you sure you updated the right diff? It none of the changes you mentioned and doesn't include BUILD.bazel either.
Created attachment 240653 [details] arm-compute-library.shar I am very sorry, other file
Now you have ${INSTALL_DATA} ${WRKSRC}/build/*.so ${STAGEDIR}${PREFIX}/lib/ Files ending in .so are shared libraries, which need to be installed with INSTALL_LIB. It's only the static libraries which need INSTALL_DATA instead. I don'see the BUILD.bazel file that was not accounted for either. Let's hope it doesn't fail the build test again. Will start the build tests in a few hours as my machine is currently occupied.
I must also ask you to add an ONLY_FOR_ARCHS_REASON if you have ONLY_FOR_ARCHS in there (as already mentioned in comment #4). Please look at the previous comments and try to fix all issues that were raised with your previous patches and build test before submitting a new version. This saves a lot of time. If the current version of your patch (attachment #240653 [details]) fails to build once again, I will refuse to look at further versions unless you attach a full Poudriere build log of the port that completes with no errors or warnings.
Build fails on amd64, armv7 and arm64 FreeBSD 13.1: ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: include/wrkdirs/usr/ports/devel/computelibrary/work/ComputeLibrary-23.02/include/BUILD.bazel Error: Orphaned: include/wrkdirs/usr/ports/devel/computelibrary/work/ComputeLibrary-23.02/include/CL/cl.h Error: Orphaned: include/wrkdirs/usr/ports/devel/computelibrary/work/ComputeLibrary-23.02/include/CL/cl_d3d10 .h (...) ===> Checking for items in pkg-plist which are not in STAGEDIR Error: Missing: include/CL/cl.h Error: Missing: include/CL/cl_d3d10.h (...) Looks like you didn't use COPYTREE_SHARE correctly. Revisit the Porter's Handbook for the correct usage. You also forgot about the BUILD.bazel file. Build also fails on i386 FreeBSD 13.1: g++12 -o build/src/common/cpuinfo/CpuInfo.o -c -DARCH_ARM -Wextra -Wdisabled-optimization -Wformat=2 -Winit-self -Wstrict-overflow=2 -Wswitch-default -Woverloaded-virtual -Wformat-security -Wctor-dtor-privacy -Wsign-promo -Weffc++ -Wno-overlength-strings -Wall -std=c++14 -pedantic -Wlogical-op -Wnoexcept -Wstrict-null-sentinel -Wno-misleading-indentation -fPIC -Wno-ignored-attributes -DENABLE_FP16_KERNELS -DENABLE_FP32_KERNELS -DENABLE_QASYMM8_KERNELS -DENABLE_QASYMM8_SIGNED_KERNELS -DENABLE_QSYMM16_KERNELS -DENABLE_INTEGER_KERNELS -DENABL E_NHWC_KERNELS -DENABLE_NCHW_KERNELS -fPIC -O3 -m64 -D_GLIBCXX_USE_NANOSLEEP -DARM_COMPUTE_CPP_SCHEDULER=1 -D ENABLE_NEON -DARM_COMPUTE_ENABLE_NEON -DARM_COMPUTE_GRAPH_ENABLED -DARM_COMPUTE_OPENCL_ENABLED -DARM_COMPUTE_VERSION_MAJOR=30 -DARM_COMPUTE_VERSION_MINOR=0 -DARM_COMPUTE_VERSION_PATCH=0 -Iinclude -I. -Ibuild/build/src/core -Ibuild/src/core src/common/cpuinfo/CpuInfo.cpp cc1plus: sorry, unimplemented: 64-bit mode not compiled in It appears that the port tries to build itself in 64 bit mode despite the target being i386. I must ask you to provide at least one successful build log (including stage-qa and check-plist, ideally with Poudriere) before I will look at your next revision.
Created attachment 240676 [details] arm-compute-library.shar Disable i386 arch for x64 mode, Fixed build with ${COPYTREE_SHARE}
Please provide a build log as requested so we can proceed.
(In reply to Robert Clausecker from comment #21) =========================================================================== =>> Checking for filesystem violations... done =======================<phase: run-depends >============================ ===> ComputeLibrary-23.02 depends on executable: gcc11 - found =========================================================================== =>> Recording filesystem state for prestage... done =======================<phase: stage >============================ ===> Staging for ComputeLibrary-23.02 ===> ComputeLibrary-23.02 depends on executable: gcc11 - found ===> Generating temporary packing list install -m 0644 /wrkdirs/usr/ports/devel/compute-library/work/ComputeLibrary-23.02/build/*.so /wrkdirs/usr/ports/devel/compute-library/work/stage/usr/local/lib/ install -m 0644 /wrkdirs/usr/ports/devel/compute-library/work/ComputeLibrary-23.02/build/*.a /wrkdirs/usr/ports/devel/compute-library/work/stage/usr/local/lib/ cd /wrkdirs/usr/ports/devel/compute-library/work/ComputeLibrary-23.02/include/ && /bin/sh -c '(/usr/bin/find -Ed $1 $3 | /usr/bin/cpio -dumpl $2 >/dev/null 2>&1) && /usr/bin/find -Ed $1 $3 \( -type d -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 755 "$@"'\'' . {} + -o -type f -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 0644 "$@"'\'' . {} + \)' COPYTREE_SHARE . /wrkdirs/usr/ports/devel/compute-library/work/stage/usr/local/include/ ====> Compressing man pages (compress-man) =========================================================================== ====> Running Q/A tests (stage-qa) Warning: 'lib/libarm_compute.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'lib/libarm_compute_graph.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} Warning: 'lib/libarm_compute_core.so' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD} ====> Checking for pkg-plist issues (check-plist) ===> Parsing plist ===> Checking for items in STAGEDIR missing from pkg-plist ===> Checking for items in pkg-plist which are not in STAGEDIR ===> No pkg-plist issues found (check-plist) =>> Checking for staging violations... done =======================<phase: package >============================ ===> Building package for ComputeLibrary-23.02 =========================================================================== =>> Recording filesystem state for preinst... done =======================<phase: install >============================ ===> Installing for ComputeLibrary-23.02 ===> Checking if ComputeLibrary is already installed ===> Registering installation for ComputeLibrary-23.02 [freebsd131x64-2022Q4] Installing ComputeLibrary-23.02... =========================================================================== =>> Checking shared library dependencies 0x0000000000000001 NEEDED Shared library: [libarm_compute.so] 0x0000000000000001 NEEDED Shared library: [libc.so.7] 0x0000000000000001 NEEDED Shared library: [libdl.so.1] 0x0000000000000001 NEEDED Shared library: [libgcc_s.so.1] 0x0000000000000001 NEEDED Shared library: [libm.so.5] 0x0000000000000001 NEEDED Shared library: [libstdc++.so.6] 0x0000000000000001 NEEDED Shared library: [libthr.so.3] =======================<phase: deinstall >============================ ===> Deinstalling for ComputeLibrary ===> Deinstalling ComputeLibrary-23.02 Updating database digests format: .......... done Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: ComputeLibrary: 23.02 Number of packages to be removed: 1 The operation will free 26 MiB. [freebsd131x64-2022Q4] [1/1] Deinstalling ComputeLibrary-23.02... [freebsd131x64-2022Q4] [1/1] Deleting files for ComputeLibrary-23.02: .......... done =========================================================================== =>> Checking for extra files and directories [00:05:29] Installing from package [freebsd131x64-2022Q4] Installing ComputeLibrary-23.02... [freebsd131x64-2022Q4] Extracting ComputeLibrary-23.02: .......... done [00:05:30] Cleaning up ===> Cleaning for ComputeLibrary-23.02 [00:05:30] Deinstalling package Updating database digests format: . done Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: ComputeLibrary: 23.02 Number of packages to be removed: 1 The operation will free 26 MiB. [freebsd131x64-2022Q4] [1/1] Deinstalling ComputeLibrary-23.02... [freebsd131x64-2022Q4] [1/1] Deleting files for ComputeLibrary-23.02: .......... done build of devel/compute-library | ComputeLibrary-23.02 ended at Wed Mar 8 21:03:48 CET 2023 build time: 00:05:23 [00:05:30] Logs: /usr/local/poudriere/data/logs/bulk/freebsd131x64-2022Q4/2023-03-08_20h58m18s [00:05:30] Cleaning up [00:05:30] Unmounting file systems
Your use of INSTALL_DATA vs INSTALL_LIB is still wrong. The other issues I raised are still not addressed. Why do you continue to not fix the issues that were raised? Also please note that I am asking you questions because I am interested in your answers. You have so far not answered most of the questions I asked. It is hard for me to continue if you do not answer the questions I ask you. Please understand that I am doing this as a volunteer. My time to review ports is limited and your patch has already taken a lot of this limited time as you keep submitting new revisions that have not fixed the issues I have raised with your previous patches. If you keep doing this I must drop this patch and leave it for someone else to review.
Created attachment 240681 [details] arm-compute-library.shar Thank you for your time. I respect your volunteer but i am also a volunteer, and maintainer and i made more than 15 ports for FreeBSD. I think that the main problem with this port is runtime. =========================================================================== =>> Checking for filesystem violations... done =======================<phase: run-depends >============================ ===> ComputeLibrary-23.02 depends on executable: gcc11 - found =========================================================================== =>> Recording filesystem state for prestage... done =======================<phase: stage >============================ ===> Staging for ComputeLibrary-23.02 ===> ComputeLibrary-23.02 depends on executable: gcc11 - found ===> Generating temporary packing list install -s -m 0644 /wrkdirs/usr/ports/devel/compute-library/work/ComputeLibrary-23.02/build/*.so /wrkdirs/usr/ports/devel/compute-library/work/stage/usr/local/lib/ install -m 0644 /wrkdirs/usr/ports/devel/compute-library/work/ComputeLibrary-23.02/build/*.a /wrkdirs/usr/ports/devel/compute-library/work/stage/usr/local/lib/ cd /wrkdirs/usr/ports/devel/compute-library/work/ComputeLibrary-23.02/include/ && /bin/sh -c '(/usr/bin/find -Ed $1 $3 | /usr/bin/cpio -dumpl $2 >/dev/null 2>&1) && /usr/bin/find -Ed $1 $3 \( -type d -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 755 "$@"'\'' . {} + -o -type f -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 0644 "$@"'\'' . {} + \)' COPYTREE_SHARE . /wrkdirs/usr/ports/devel/compute-library/work/stage/usr/local/include/ ====> Compressing man pages (compress-man) =========================================================================== ====> Running Q/A tests (stage-qa) ====> Checking for pkg-plist issues (check-plist) ===> Parsing plist ===> Checking for items in STAGEDIR missing from pkg-plist ===> Checking for items in pkg-plist which are not in STAGEDIR ===> No pkg-plist issues found (check-plist) =>> Checking for staging violations... done =======================<phase: package >============================ ===> Building package for ComputeLibrary-23.02 =========================================================================== =>> Recording filesystem state for preinst... done =======================<phase: install >============================ ===> Installing for ComputeLibrary-23.02 ===> Checking if ComputeLibrary is already installed ===> Registering installation for ComputeLibrary-23.02 [freebsd131x64-2022Q4] Installing ComputeLibrary-23.02... =========================================================================== =>> Checking shared library dependencies 0x0000000000000001 NEEDED Shared library: [libarm_compute.so] 0x0000000000000001 NEEDED Shared library: [libc.so.7] 0x0000000000000001 NEEDED Shared library: [libdl.so.1] 0x0000000000000001 NEEDED Shared library: [libgcc_s.so.1] 0x0000000000000001 NEEDED Shared library: [libm.so.5] 0x0000000000000001 NEEDED Shared library: [libstdc++.so.6] 0x0000000000000001 NEEDED Shared library: [libthr.so.3] =======================<phase: deinstall >============================ ===> Deinstalling for ComputeLibrary ===> Deinstalling ComputeLibrary-23.02 Updating database digests format: .......... done Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: ComputeLibrary: 23.02 Number of packages to be removed: 1 The operation will free 25 MiB. [freebsd131x64-2022Q4] [1/1] Deinstalling ComputeLibrary-23.02... [freebsd131x64-2022Q4] [1/1] Deleting files for ComputeLibrary-23.02: .......... done =========================================================================== =>> Checking for extra files and directories [00:07:22] Installing from package [freebsd131x64-2022Q4] Installing ComputeLibrary-23.02... [freebsd131x64-2022Q4] Extracting ComputeLibrary-23.02: .......... done [00:07:22] Cleaning up ===> Cleaning for ComputeLibrary-23.02 [00:07:22] Deinstalling package Updating database digests format: . done Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: ComputeLibrary: 23.02 Number of packages to be removed: 1 The operation will free 25 MiB. [freebsd131x64-2022Q4] [1/1] Deinstalling ComputeLibrary-23.02... [freebsd131x64-2022Q4] [1/1] Deleting files for ComputeLibrary-23.02: .......... done build of devel/compute-library | ComputeLibrary-23.02 ended at Wed Mar 8 22:53:03 CET 2023 build time: 00:07:16 [00:07:22] Logs: /usr/local/poudriere/data/logs/bulk/freebsd131x64-2022Q4/2023-03-08_22h45m41s [00:07:22] Cleaning up [00:07:23] Unmounting file systems