From nobody Fri Jun 10 19:04:46 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A8FCB841CB1; Fri, 10 Jun 2022 19:04:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LKVl24Jttz4rTG; Fri, 10 Jun 2022 19:04:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654887886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CY76/bg8jqqBGAQEPYIDy04Xf9O6qTPe1eM3+O1oHOc=; b=Jxv1G7p3w7BQJK3T7y6PoW5sXcLPsjkbl6zLFt1kuXHkSLzb4vXtL2Yr1tpro1TtHmeRqv GGvLg154/hyBoJnPSL3EuN2hFvrmZcAoZp4HhZL5H8zkUtnlPv9sRCMfjusfcYRNFk1XsH 8wIKFmGtqfA9ZYlKchN27swNfZDtzv3YaB0acRzswsTzJhW9xs9iFQKqZTyLBTtmKK31UP YfV6YH7tWrUA1Kgu+zjC3SL5GI9rX7+w9LHeb0otJEv3rttbZhtfoer48MDa95hIhy5TGK O0VMws+ZZIvfNF1u9VbUXs3JgmFgaJHPMH24bfis5A+CavygsmI5j+geXt1Ohw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 747CF1E499; Fri, 10 Jun 2022 19:04:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25AJ4kPu054286; Fri, 10 Jun 2022 19:04:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25AJ4khT054285; Fri, 10 Jun 2022 19:04:46 GMT (envelope-from git) Date: Fri, 10 Jun 2022 19:04:46 GMT Message-Id: <202206101904.25AJ4khT054285@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Chris Rees Subject: git: 67d31a51c68c - main - science/libtensorflow1: Add new port List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: crees X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67d31a51c68c5dd076bf87ceabfbfa6c5bc1374f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654887886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CY76/bg8jqqBGAQEPYIDy04Xf9O6qTPe1eM3+O1oHOc=; b=fMU1HhLQZcCZJN72FADgNmNGFAK9X1yYtgS2Ae+zocnDobM1tibc+yBiLLXWvfpLUSB9a6 UbHkn39BZAvSEVSA8IP+iUvz/eFzbvFbnTd8cmzVQWb0H1u/nVG+oInyWzfVK13e74uohw FKOCQQnATKA+FLWxybgMLiEGY2HPXI6y95i737zIbLvSIT2igVyeUlP/Ye6ohiK4CllEHO MMkFcHmn7Wbe0lrcS+2Zt7R8DtpeqRMfrv/zNeY+ZASJN8955qSomTPARDJyRqu3DbqtgZ wQV0tyGMAD3TQ5DJ6gT/xfKKPIsuvmkhAB6jI8kH1odLt02AlGZv63N3AzF9TA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654887886; a=rsa-sha256; cv=none; b=Xp60thfLrdoRZYJkHeVOArgDKe/LiUU8TpzElzb67feS+/KLCUHL87UvyqZr5kuKvbBO94 7/IQ32QvZpXsOH1xSwODkU7ef6up0Z/CVoAY3c+uH1dvEkjdQtgp/RJBT+r2UHMFtCOIiC I9z3l716mr77B3736AckPEHBXFP5v8HQFaEvi2RjgTZmfi5Up25b6yYd5LTMurauwN7HW3 MOTALRuJjnujDlFcoNLHFzf4UgHHXWpUFcp/GzA9OtrZGsIa5UEUtjESI1PhjLWVXXSiiw SyzjAEVCWw/HW6bkVyyiFCKoDjU2lgDWYQy282u+MJ+y+3ecnqlyRZXWKNhj/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by crees: URL: https://cgit.FreeBSD.org/ports/commit/?id=67d31a51c68c5dd076bf87ceabfbfa6c5bc1374f commit 67d31a51c68c5dd076bf87ceabfbfa6c5bc1374f Author: Paul Armstrong AuthorDate: 2022-05-27 15:55:23 +0000 Commit: Chris Rees CommitDate: 2022-06-10 19:04:30 +0000 science/libtensorflow1: Add new port C API for TensorFlow, an open source platform for machine learning TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML-powered applications. The TensorFlow C API is typically a requirement of TensorFlow APIs in other languages such as Go and Rust. This is version 1 of the API, which is deprecated but still widely used. PR: ports/260694 Improved by: delphij --- science/Makefile | 1 + science/libtensorflow1/Makefile | 200 +++++++++++++++++++++ science/libtensorflow1/distinfo | 83 +++++++++ .../files/extra-patch-third_party_repo.bzl | 25 +++ science/libtensorflow1/files/patch-.bazelrc | 52 ++++++ science/libtensorflow1/files/patch-configure.py | 11 ++ science/libtensorflow1/pkg-descr | 9 + science/libtensorflow1/pkg-plist | 16 ++ 8 files changed, 397 insertions(+) diff --git a/science/Makefile b/science/Makefile index 48b215f77451..0d68cabeea82 100644 --- a/science/Makefile +++ b/science/Makefile @@ -147,6 +147,7 @@ SUBDIR += libssm SUBDIR += libsvm SUBDIR += libsvm-python + SUBDIR += libtensorflow1 SUBDIR += libvdwxc SUBDIR += libxc SUBDIR += liggghts diff --git a/science/libtensorflow1/Makefile b/science/libtensorflow1/Makefile new file mode 100644 index 000000000000..fa459e4a2bef --- /dev/null +++ b/science/libtensorflow1/Makefile @@ -0,0 +1,200 @@ +PORTNAME= libtensorflow1 +DISTVERSIONPREFIX= v +DISTVERSION= 1.15.5 +DISTVERSIONSUFFIX= +CATEGORIES= science + +MAINTAINER= freebsd-ports@otoh.org +COMMENT= C API for TensorFlow, an open source platform for machine learning + +LICENSE= APACHE20 THIRD_PARTY_TF_C_LICENSES +LICENSE_COMB= multi +LICENSE_NAME_THIRD_PARTY_TF_C_LICENSES= Third-Party TensorFlow C Licenses +LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE +LICENSE_FILE_THIRD_PARTY_TF_C_LICENSES= ${WRKDIR}/THIRD_PARTY_TF_C_LICENSES +LICENSE_PERMS_THIRD_PARTY_TF_C_LICENSES= dist-mirror dist-sell \ + pkg-mirror pkg-sell auto-accept + +ONLY_FOR_ARCHS= amd64 + +BUILD_DEPENDS= bash:shells/bash \ + bazel:devel/bazel029 \ + git:devel/git + +USES= gmake python:3.7-3.9,build + +USE_GITHUB= yes +GH_ACCOUNT= tensorflow +GH_PROJECT= tensorflow +GH_TUPLE= bazelbuild:rules_closure:308b05b2:bazelbuild_rules_closure \ + intel:mkl-dnn:v0.20.6:intel_mkl_dnn_0 \ + intel:mkl-dnn:v1.0-pc2:intel_mkl_dnn_1 \ + abseil:abseil-cpp:43ef2148c0936ebf7cb4be6b19927a9d9d145b8f:abseil_abseil_cpp \ + rvagg:rpi-newer-crosstools:eb68350c5c8ec1663b7fe52c742ac4271e3217c5:rvagg_rpi_newer_crosstools \ + hfp:libxsmm:1.11:hfp_libxsmm \ + google:re2:506cfa4bffd060c06ec338ce50ea3468daa6c814:google_re2 \ + googleapis:google-cloud-cpp:v0.10.0:googleapis_google_cloud_cpp \ + googleapis:googleapis:f81082ea1e2f85c43649bee26e0d9871d4b41cdb:googleapis_googleapis \ + google:gemmlowp:12fed0cd7cfcd9e169bf1925bc3a7a58725fdcc3:google_gemmlowp \ + google:farmhash:816a4ae622e964763ca0862d9dbd19324a1eaf45:google_farmhash \ + glennrp:libpng:v1.6.37:glennrp_libpng \ + abseil:abseil-py:pypi-v0.7.1:abseil_abseil_py \ + protocolbuffers:protobuf:310ba5ee72661c081129eb878c1bbcec936b20f0:protocolbuffers_protobuf \ + google:nsync:1.22.0:google_nsync \ + google:googletest:b6cd405286ed8635ece71c72f118e659f4ade3fb:google_googletest \ + gflags:gflags:v2.2.1:gflags_gflags \ + grpc:grpc:4566c2a29ebec0835643b972eb99f4306c4234a3:grpc_grpc \ + nanopb:nanopb:f8ac463766281625ad710900479130c7fcb4d63b:nanopb_nanopb \ + antirez:linenoise:c894b9e59f02203dbe4e2be657572cf88c4230c3:antirez_linenoise \ + llvm-mirror:llvm:7a7e03f906aada0cf4b749b51213fe5784eeff84:llvm_mirror_llvm \ + LMDB:lmdb:LMDB_0.9.22:LMDB_lmdb \ + open-source-parsers:jsoncpp:1.8.4:open_source_parsers_jsoncpp \ + google:boringssl:7f634429a04abc48e2eb041c81c5235816c96514:google_boringssl \ + google:snappy:1.1.7:google_snappy \ + nvidia:nccl:0ceaec9cee96ae7658aa45686853286651f36384:nvidia_nccl \ + edenhill:librdkafka:v0.11.5:edenhill_librdkafka \ + google:pprof:c0fb62ec88c411cc91194465e54db2632845b650:google_pprof \ + NVlabs:cub:1.8.0:NVlabs_cub \ + ROCmSoftwarePlatform:rocPRIM:4a33d328f8352df1654271939da66914f2334424:ROCmSoftwarePlatform_rocPRIM \ + cython:cython:0.28.4:cython_cython \ + intel:ARM_NEON_2_x86_SSE:1200fe90bb174a6224a525ee60148671a786a71f:intel_ARM_NEON_2_x86_SSE \ + google:double-conversion:3992066a95b823efc8ccc1baf82a1cfc73f6e9b8:google_double_conversion \ + bazelbuild:rules_android:v0.1.1:bazelbuild_rules_android \ + 01org:tbb:2019_U1:01org_tbb \ + NervanaSystems:ngraph:v0.11.0:NervanaSystems_ngraph \ + nlohmann:json:v3.4.0:nlohmann_json \ + NervanaSystems:ngraph-tf:v0.9.0:NervanaSystems_ngraph_tf \ + pybind:pybind11:v2.3.0:pybind_pybind11 \ + GrahamDumpleton:wrapt:1.11.1:GrahamDumpleton_wrapt + +USE_LDCONFIG= yes + +CONFLICTS_INSTALL= science/libtensorflow2 + +CC?= clang + +BINARY_ALIAS= python3=${PYTHON_CMD} python=${PYTHON_CMD} + +SOVERSION= ${DISTVERSION} +PLIST_SUB= SOVERSION=${SOVERSION} + +OPTIONS_DEFINE= CUDA OPENCL_SYCL ROCM XLA +OPTIONS_DEFAULT= AVX + +OPTIONS_SINGLE= CPUFEATURE +OPTIONS_SINGLE_CPUFEATURE= AVX AVX2 NOAVX + +NOAVX_DESC= Disable Advanced Vector Extensions +AVX_DESC= Enable Advanced Vector Extensions (AVX) +AVX2_DESC= Enable Advanced Vector Extensions v2 (AVX2) + +NOAVX_VARS= BAZEL_ARGS="" +AVX_VARS= BAZEL_ARGS="--copt=-march=core-avx-i --host_copt=-march=core-avx-i" +AVX2_VARS= BAZEL_ARGS="--copt=-march=core-avx2 --host_copt=-march=core-avx2" + +CUDA_DESC= Enable Compute Unified Device Architecture (CUDA) for Nvidia GPUs +CUDA_VARS= TF_ENABLE_CUDA=1 +CUDA_VARS_OFF= TF_ENABLE_CUDA=0 + +OPENCL_SYCL_DESC= Enable OpenCL Sycl +OPENCL_SYCL_VARS= TF_NEED_OPENCL_SYCL=1 +OPENCL_SYCL_VARS_OFF= TF_NEED_OPENCL_SYCL=0 + +ROCM_DESC= Enable Radeon Open Computer (ROCm) for AMD GPUs +ROCM_VARS= TF_ENABLE_ROCM=1 +ROCM_VARS_OFF= TF_ENABLE_ROCM=0 + +XLA_DESC= Enable Accelerated Linear Algebra (XLA) +XLA_VARS= TF_ENABLE_XLA=1 +XLA_VARS_OFF= TF_ENABLE_XLA=0 + +BAZEL_OPTS= --output_user_root=${WRKDIR}/bazel_out + +.include +.if ${OPSYS} == FreeBSD && ${OSVERSION} > 1200000 && ${OSVERSION} < 1300000 +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-third_party_repo.bzl +.endif + +post-extract: +# THIRD_PARTY_TF_C_LICENSES is generated as a Bazel build target (see +# //tensorflow/tools/lib_package:clicenses) and the empty file written +# here will be overwritten. Creation of this file is to satisfy checks. + @${TOUCH} ${WRKDIR}/THIRD_PARTY_TF_C_LICENSES + +post-patch: + ${REINPLACE_CMD} -e 's,%%PYTHON_CMD%%,${PYTHON_CMD},' \ + -e 's,%%LOCALBASE%%,${LOCALBASE},' \ + ${WRKSRC}/.bazelrc + +do-configure: + @cd ${WRKSRC} && ${SETENV} \ + CC_OPT_FLAGS="-I${LOCALBASE}/include -march=native -Wno-sign-compare" \ + PREFIX="${LOCALBASE}" \ + PYTHON_BIN_PATH=${PYTHON_CMD} \ + PYTHON_LIB_PATH="${PYTHON_SITELIBDIR}" \ + TF_CONFIGURE_IOS=0 \ + TF_DOWNLOAD_CLANG=0 \ + TF_NEED_OPENCL_SYCL=${TF_NEED_OPENCL_SYCL} \ + TF_ENABLE_XLA=${TF_ENABLE_XLA} \ + TF_IGNORE_MAX_BAZEL_VERSION=0 \ + TF_NEED_CUDA=${TF_ENABLE_CUDA} \ + TF_NEED_MPI=0 \ + TF_NEED_ROCM=${TF_ENABLE_ROCM} \ + TF_NEED_TENSORRT=0 \ + TF_SET_ANDROID_WORKSPACE=0 \ + ${LOCALBASE}/bin/bash ./configure + +do-build: + @cd ${WRKSRC} && ${LOCALBASE}/bin/bazel ${BAZEL_OPTS} build \ + ${BAZEL_ARGS} \ + --action_env=PATH=${PATH} \ + --discard_analysis_cache \ + --local_cpu_resources=${MAKE_JOBS_NUMBER} \ + --nokeep_state_after_build \ + --noshow_loading_progress \ + --noshow_progress \ + --notrack_incremental_state \ + --subcommands \ + --verbose_failures \ + //tensorflow/tools/lib_package:clicenses_generate \ + //tensorflow/tools/lib_package:libtensorflow.tar.gz + +do-test: + @cd ${WRKSRC} && ${LOCALBASE}/bin/bazel ${BAZEL_OPTS} test \ + ${BAZEL_ARGS} \ + --action_env=PATH=${PATH} \ + --discard_analysis_cache \ + --local_cpu_resources=${MAKE_JOBS_NUMBER} \ + --nokeep_state_after_build \ + --noshow_loading_progress \ + --noshow_progress \ + --notrack_incremental_state \ + --subcommands \ + --test_env=CC=${CC} \ + --verbose_failures \ + //tensorflow/tools/lib_package:libtensorflow_test + +pre-install: + ${CP} ${WRKSRC}/bazel-bin/tensorflow/tools/lib_package/THIRD_PARTY_TF_C_LICENSES \ + ${WRKDIR}/THIRD_PARTY_TF_C_LICENSES + ${MKDIR} ${WRKDIR}/lib_package + (cd ${WRKDIR}/lib_package && ${TAR} xvf \ + ${WRKSRC}/bazel-bin/tensorflow/tools/lib_package/libtensorflow.tar.gz) + ${MKDIR} ${STAGEDIR}${PREFIX}/include/tensorflow/c/eager + +do-install: +.for f in c_api_experimental.h c_api.h eager/c_api.h \ + tf_attrtype.h tf_datatype.h tf_status.h tf_tensor.h + ${INSTALL_DATA} ${WRKDIR}/lib_package/include/tensorflow/c/${f} \ + ${STAGEDIR}${PREFIX}/include/tensorflow/c/${f} +.endfor +.for l in libtensorflow libtensorflow_framework + ${INSTALL_PROGRAM} ${WRKDIR}/lib_package/lib/${l}.so.${SOVERSION} \ + ${STAGEDIR}${PREFIX}/lib/ + ${RLN} ${STAGEDIR}${PREFIX}/lib/${l}.so.${SOVERSION} \ + ${STAGEDIR}${PREFIX}/lib/${l}.so.1 + ${RLN} ${STAGEDIR}${PREFIX}/lib/${l}.so.1 \ + ${STAGEDIR}${PREFIX}/lib/${l}.so +.endfor + +.include diff --git a/science/libtensorflow1/distinfo b/science/libtensorflow1/distinfo new file mode 100644 index 000000000000..7a3e1667aec6 --- /dev/null +++ b/science/libtensorflow1/distinfo @@ -0,0 +1,83 @@ +TIMESTAMP = 1653669876 +SHA256 (tensorflow-tensorflow-v1.15.5_GH0.tar.gz) = 4c4d23e311093ded2d2e287b18d7c45b07b5984ab88a1d2f91f8f13c886123db +SIZE (tensorflow-tensorflow-v1.15.5_GH0.tar.gz) = 46212258 +SHA256 (bazelbuild-rules_closure-308b05b2_GH0.tar.gz) = f86606a15709a381fa85a0ec0fb1a99c28359aa171e3827f071b702fc6c82ef8 +SIZE (bazelbuild-rules_closure-308b05b2_GH0.tar.gz) = 465163 +SHA256 (intel-mkl-dnn-v0.20.6_GH0.tar.gz) = f1de676fddeb94132c5ae480fb03a64f03deda10b09b3141373f2b2fe5cd031d +SIZE (intel-mkl-dnn-v0.20.6_GH0.tar.gz) = 1680817 +SHA256 (intel-mkl-dnn-v1.0-pc2_GH0.tar.gz) = 7ea70b5ec4b1604d494dc28c83f2de62cfbf956c5043d10c853ee7193d0e33bd +SIZE (intel-mkl-dnn-v1.0-pc2_GH0.tar.gz) = 1662300 +SHA256 (abseil-abseil-cpp-43ef2148c0936ebf7cb4be6b19927a9d9d145b8f_GH0.tar.gz) = acd93f6baaedc4414ebd08b33bebca7c7a46888916101d8c0b8083573526d070 +SIZE (abseil-abseil-cpp-43ef2148c0936ebf7cb4be6b19927a9d9d145b8f_GH0.tar.gz) = 1281523 +SHA256 (rvagg-rpi-newer-crosstools-eb68350c5c8ec1663b7fe52c742ac4271e3217c5_GH0.tar.gz) = b9e7d50ffd9996ed18900d041d362c99473b382c0ae049b2fce3290632d2656f +SIZE (rvagg-rpi-newer-crosstools-eb68350c5c8ec1663b7fe52c742ac4271e3217c5_GH0.tar.gz) = 253600426 +SHA256 (hfp-libxsmm-1.11_GH0.tar.gz) = 5fc1972471cd8e2b8b64ea017590193739fc88d9818e3d086621e5c08e86ea35 +SIZE (hfp-libxsmm-1.11_GH0.tar.gz) = 2931544 +SHA256 (google-re2-506cfa4bffd060c06ec338ce50ea3468daa6c814_GH0.tar.gz) = d070e2ffc5476c496a6a872a6f246bfddce8e7797d6ba605a7c8d72866743bf9 +SIZE (google-re2-506cfa4bffd060c06ec338ce50ea3468daa6c814_GH0.tar.gz) = 316237 +SHA256 (googleapis-google-cloud-cpp-v0.10.0_GH0.tar.gz) = fd0c3e3b50f32af332b53857f8cd1bfa009e33d1eeecabc5c79a4825d906a90c +SIZE (googleapis-google-cloud-cpp-v0.10.0_GH0.tar.gz) = 2189161 +SHA256 (googleapis-googleapis-f81082ea1e2f85c43649bee26e0d9871d4b41cdb_GH0.tar.gz) = eca9b62c8571ab251f9b3e8db26d9f48bef3ae714f02371782e872b146cc3b0e +SIZE (googleapis-googleapis-f81082ea1e2f85c43649bee26e0d9871d4b41cdb_GH0.tar.gz) = 692444 +SHA256 (google-gemmlowp-12fed0cd7cfcd9e169bf1925bc3a7a58725fdcc3_GH0.tar.gz) = ab3873363ed63cd0090bd4e59dc29e63ecce9d84e66093083e5fda2cac14e74b +SIZE (google-gemmlowp-12fed0cd7cfcd9e169bf1925bc3a7a58725fdcc3_GH0.tar.gz) = 838386 +SHA256 (google-farmhash-816a4ae622e964763ca0862d9dbd19324a1eaf45_GH0.tar.gz) = 6560547c63e4af82b0f202cb710ceabb3f21347a4b996db565a411da5b17aba0 +SIZE (google-farmhash-816a4ae622e964763ca0862d9dbd19324a1eaf45_GH0.tar.gz) = 467122 +SHA256 (glennrp-libpng-v1.6.37_GH0.tar.gz) = ca74a0dace179a8422187671aee97dd3892b53e168627145271cad5b5ac81307 +SIZE (glennrp-libpng-v1.6.37_GH0.tar.gz) = 1508805 +SHA256 (abseil-abseil-py-pypi-v0.7.1_GH0.tar.gz) = 3d0f39e0920379ff1393de04b573bca3484d82a5f8b939e9e83b20b6106c9bbe +SIZE (abseil-abseil-py-pypi-v0.7.1_GH0.tar.gz) = 215669 +SHA256 (protocolbuffers-protobuf-310ba5ee72661c081129eb878c1bbcec936b20f0_GH0.tar.gz) = b9e92f9af8819bbbc514e2902aec860415b70209f31dfc8c4fa72515a5df9d59 +SIZE (protocolbuffers-protobuf-310ba5ee72661c081129eb878c1bbcec936b20f0_GH0.tar.gz) = 4939334 +SHA256 (google-nsync-1.22.0_GH0.tar.gz) = caf32e6b3d478b78cff6c2ba009c3400f8251f646804bcb65465666a9cea93c4 +SIZE (google-nsync-1.22.0_GH0.tar.gz) = 154997 +SHA256 (google-googletest-b6cd405286ed8635ece71c72f118e659f4ade3fb_GH0.tar.gz) = 8d9aa381a6885fe480b7d0ce8ef747a0b8c6ee92f99d74ab07e3503434007cb0 +SIZE (google-googletest-b6cd405286ed8635ece71c72f118e659f4ade3fb_GH0.tar.gz) = 964196 +SHA256 (gflags-gflags-v2.2.1_GH0.tar.gz) = ae27cdbcd6a2f935baa78e4f21f675649271634c092b1be01469440495609d0e +SIZE (gflags-gflags-v2.2.1_GH0.tar.gz) = 96985 +SHA256 (grpc-grpc-4566c2a29ebec0835643b972eb99f4306c4234a3_GH0.tar.gz) = 67a6c26db56f345f7cee846e681db2c23f919eba46dd639b09462d1b6203d28c +SIZE (grpc-grpc-4566c2a29ebec0835643b972eb99f4306c4234a3_GH0.tar.gz) = 14793534 +SHA256 (nanopb-nanopb-f8ac463766281625ad710900479130c7fcb4d63b_GH0.tar.gz) = 8bbbb1e78d4ddb0a1919276924ab10d11b631df48b657d960e0c795a25515735 +SIZE (nanopb-nanopb-f8ac463766281625ad710900479130c7fcb4d63b_GH0.tar.gz) = 223184 +SHA256 (antirez-linenoise-c894b9e59f02203dbe4e2be657572cf88c4230c3_GH0.tar.gz) = 7f51f45887a3d31b4ce4fa5965210a5e64637ceac12720cfce7954d6a2e812f7 +SIZE (antirez-linenoise-c894b9e59f02203dbe4e2be657572cf88c4230c3_GH0.tar.gz) = 17373 +SHA256 (llvm-mirror-llvm-7a7e03f906aada0cf4b749b51213fe5784eeff84_GH0.tar.gz) = 599b89411df88b9e2be40b019e7ab0f7c9c10dd5ab1c948cd22e678cc8f8f352 +SIZE (llvm-mirror-llvm-7a7e03f906aada0cf4b749b51213fe5784eeff84_GH0.tar.gz) = 50144723 +SHA256 (LMDB-lmdb-LMDB_0.9.22_GH0.tar.gz) = f3927859882eb608868c8c31586bb7eb84562a40a6bf5cc3e13b6b564641ea28 +SIZE (LMDB-lmdb-LMDB_0.9.22_GH0.tar.gz) = 143468 +SHA256 (open-source-parsers-jsoncpp-1.8.4_GH0.tar.gz) = c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6 +SIZE (open-source-parsers-jsoncpp-1.8.4_GH0.tar.gz) = 200226 +SHA256 (google-boringssl-7f634429a04abc48e2eb041c81c5235816c96514_GH0.tar.gz) = 1188e29000013ed6517168600fc35a010d58c5d321846d6a6dfee74e4c788b45 +SIZE (google-boringssl-7f634429a04abc48e2eb041c81c5235816c96514_GH0.tar.gz) = 25868122 +SHA256 (google-snappy-1.1.7_GH0.tar.gz) = 3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4 +SIZE (google-snappy-1.1.7_GH0.tar.gz) = 1090550 +SHA256 (nvidia-nccl-0ceaec9cee96ae7658aa45686853286651f36384_GH0.tar.gz) = 9a7633e224982e2b60fa6b397d895d20d6b7498e3e02f46f98a5a4e187c5a44c +SIZE (nvidia-nccl-0ceaec9cee96ae7658aa45686853286651f36384_GH0.tar.gz) = 107044 +SHA256 (edenhill-librdkafka-v0.11.5_GH0.tar.gz) = cc6ebbcd0a826eec1b8ce1f625ffe71b53ef3290f8192b6cae38412a958f4fd3 +SIZE (edenhill-librdkafka-v0.11.5_GH0.tar.gz) = 1984510 +SHA256 (google-pprof-c0fb62ec88c411cc91194465e54db2632845b650_GH0.tar.gz) = e0928ca4aa10ea1e0551e2d7ce4d1d7ea2d84b2abbdef082b0da84268791d0c4 +SIZE (google-pprof-c0fb62ec88c411cc91194465e54db2632845b650_GH0.tar.gz) = 176158 +SHA256 (NVlabs-cub-1.8.0_GH0.tar.gz) = 025658f4c933cd2aa8cc88a559d013338d68de3fa639cc1f2b12cf61dc759667 +SIZE (NVlabs-cub-1.8.0_GH0.tar.gz) = 384644 +SHA256 (ROCmSoftwarePlatform-rocPRIM-4a33d328f8352df1654271939da66914f2334424_GH0.tar.gz) = 3c178461ead70ce6adb60c836a35a52564968af31dfa81f4157ab72b5f14d31f +SIZE (ROCmSoftwarePlatform-rocPRIM-4a33d328f8352df1654271939da66914f2334424_GH0.tar.gz) = 402443 +SHA256 (cython-cython-0.28.4_GH0.tar.gz) = bccc9aa050ea02595b2440188813b936eaf345e85fb9692790cecfe095cf91aa +SIZE (cython-cython-0.28.4_GH0.tar.gz) = 1904011 +SHA256 (intel-ARM_NEON_2_x86_SSE-1200fe90bb174a6224a525ee60148671a786a71f_GH0.tar.gz) = 213733991310b904b11b053ac224fee2d4e0179e46b52fe7f8735b8831e04dcc +SIZE (intel-ARM_NEON_2_x86_SSE-1200fe90bb174a6224a525ee60148671a786a71f_GH0.tar.gz) = 100612 +SHA256 (google-double-conversion-3992066a95b823efc8ccc1baf82a1cfc73f6e9b8_GH0.tar.gz) = 8af4baef4c982e4016f5bdcec837c6704c180dc9f520b3c9e5d1e0530225e15a +SIZE (google-double-conversion-3992066a95b823efc8ccc1baf82a1cfc73f6e9b8_GH0.tar.gz) = 7019893 +SHA256 (bazelbuild-rules_android-v0.1.1_GH0.tar.gz) = 6461c1c5744442b394f46645957d6bd3420eb1b421908fe63caa03091b1b3655 +SIZE (bazelbuild-rules_android-v0.1.1_GH0.tar.gz) = 7076 +SHA256 (01org-tbb-2019_U1_GH0.tar.gz) = e6fb8dd1a1ae834b4e5f4ae6c4c87a3362f81a3aaeddfa6325168c6cfee59391 +SIZE (01org-tbb-2019_U1_GH0.tar.gz) = 2512568 +SHA256 (NervanaSystems-ngraph-v0.11.0_GH0.tar.gz) = a1780f24a1381fc25e323b4b2d08b6ef5129f42e011305b2a34dcf43a48030d5 +SIZE (NervanaSystems-ngraph-v0.11.0_GH0.tar.gz) = 9799087 +SHA256 (nlohmann-json-v3.4.0_GH0.tar.gz) = c377963a95989270c943d522bfefe7b889ef5ed0e1e15d535fd6f6f16ed70732 +SIZE (nlohmann-json-v3.4.0_GH0.tar.gz) = 114639868 +SHA256 (NervanaSystems-ngraph-tf-v0.9.0_GH0.tar.gz) = f09474dc9c72b323d058bd99ba856172be81c99b8fdfada6b10cb88debec4205 +SIZE (NervanaSystems-ngraph-tf-v0.9.0_GH0.tar.gz) = 208429 +SHA256 (pybind-pybind11-v2.3.0_GH0.tar.gz) = 0f34838f2c8024a6765168227ba587b3687729ebf03dc912f88ff75c7aa9cfe8 +SIZE (pybind-pybind11-v2.3.0_GH0.tar.gz) = 564520 +SHA256 (GrahamDumpleton-wrapt-1.11.1_GH0.tar.gz) = 8a6fb40e8f8b6a66b4ba81a4044c68e6a7b1782f21cfabc06fb765332b4c3e51 +SIZE (GrahamDumpleton-wrapt-1.11.1_GH0.tar.gz) = 124773 diff --git a/science/libtensorflow1/files/extra-patch-third_party_repo.bzl b/science/libtensorflow1/files/extra-patch-third_party_repo.bzl new file mode 100644 index 000000000000..eaab437bdc72 --- /dev/null +++ b/science/libtensorflow1/files/extra-patch-third_party_repo.bzl @@ -0,0 +1,25 @@ +--- third_party/repo.bzl.orig ++++ third_party/repo.bzl +@@ -62,13 +62,15 @@ def _repos_are_siblings(): + return Label("@foo//bar").workspace_root.startswith("../") + + # Apply a patch_file to the repository root directory +-# Runs 'git apply' on Unix, 'patch -p1' on Windows. ++# Runs 'patch -p1' + def _apply_patch(ctx, patch_file): +- if _is_windows(ctx): +- patch_command = ["patch", "-p1", "-d", ctx.path("."), "-i", ctx.path(patch_file)] +- else: +- patch_command = ["git", "apply", "-v", ctx.path(patch_file)] +- cmd = _wrap_bash_cmd(ctx, patch_command) ++ # Don't check patch on Windows, because patch is only available under bash. ++ if not _is_windows(ctx) and not ctx.which("patch"): ++ fail("patch command is not found, please install it") ++ cmd = _wrap_bash_cmd( ++ ctx, ++ ["patch", "-p1", "-d", ctx.path("."), "-i", ctx.path(patch_file)], ++ ) + _execute_and_check_ret_code(ctx, cmd) + + def _apply_delete(ctx, paths): + diff --git a/science/libtensorflow1/files/patch-.bazelrc b/science/libtensorflow1/files/patch-.bazelrc new file mode 100644 index 000000000000..451c94c30fa0 --- /dev/null +++ b/science/libtensorflow1/files/patch-.bazelrc @@ -0,0 +1,52 @@ +--- .bazelrc.orig 2021-01-04 20:18:42 UTC ++++ .bazelrc +@@ -195,7 +195,7 @@ build:c++17 --cxxopt=-stdlib=libc++ + build:c++1z --config=c++17 + + # Default paths for TF_SYSTEM_LIBS +-build --define=PREFIX=/usr ++build --define=PREFIX=/usr/local + build --define=LIBDIR=$(PREFIX)/lib + build --define=INCLUDEDIR=$(PREFIX)/include + +@@ -208,6 +208,9 @@ build:short_logs --output_filter=DONT_MATCH_ANYTHING + # Instruction set optimizations + # TODO(gunan): Create a feature in toolchains for avx/avx2 to + # avoid having to define linux/win separately. ++build:avx_freebsd --copt=-mavx ++build:avx2_freebsd --copt=-mavx2 ++build:native_arch_freebsd --copt=-march=native + build:avx_linux --copt=-mavx + build:avx2_linux --copt=-mavx2 + build:native_arch_linux --copt=-march=native +@@ -295,6 +298,20 @@ build:rbe_linux_py3 --repo_env=PYTHON_BIN_PATH="/usr/b + build:rbe_linux_py3 --python_path="/usr/bin/python3" + build:rbe_linux_py3 --repo_env=TF_PYTHON_CONFIG_REPO="@org_tensorflow//third_party/toolchains/preconfig/ubuntu16.04/py3" + ++build:rbe_cpu_freebsd --config=rbe_cpu_linux ++build:rbe_freebsd_cuda_nvcc --config=rbe_linux_cuda_nvcc ++common:rbe_gpu_freebsd --config=rbe_gpu_linux ++ ++build:rbe_freebsd_py2 --config=rbe_linux ++build:rbe_freebsd_py2 --repo_env=PYTHON_BIN_PATH="%%LOCALBASE%%/bin/python2" ++build:rbe_freebsd_py2 --python_path="%%LOCALBASE%%/bin/python2" ++build:rbe_freebsd_py2 --repo_env=TF_PYTHON_CONFIG_REPO="@org_tensorflow//third_party/toolchains/preconfig/ubuntu16.04/py" ++ ++build:rbe_freebsd_py3 --config=rbe_linux ++build:rbe_freebsd_py3 --repo_env=PYTHON_BIN_PATH="%%PYTHON_CMD%%" ++build:rbe_freebsd_py3 --python_path="%%PYTHON_CMD%%" ++build:rbe_freebsd_py3 --repo_env=TF_PYTHON_CONFIG_REPO="@org_tensorflow//third_party/toolchains/preconfig/ubuntu16.04/py3" ++ + build:rbe_win --config=rbe + build:rbe_win --crosstool_top="@org_tensorflow//third_party/toolchains/preconfig/win_1803/bazel_026:toolchain" + build:rbe_win --extra_execution_platforms="@org_tensorflow//third_party/toolchains/preconfig/win_1803:rbe_windows_1803" +@@ -334,6 +351,9 @@ common:tensorflow_testing_rbe_linux --remote_instance_ + build:tensorflow_testing_rbe_linux --config=tensorflow_testing_rbe + build:tensorflow_testing_rbe_linux --config=rbe + build:tensorflow_testing_rbe_linux --config=rbe_linux ++ ++common:tensorflow_testing_rbe_freebsd --config=tensorflow_testing_rbe_linux ++build:tensorflow_testing_rbe_freebsd --config=tensorflow_testing_rbe_linux + + common:tensorflow_testing_rbe_win --remote_instance_name=projects/tensorflow-testing/instances/windows + build:tensorflow_testing_rbe_win --config=tensorflow_testing_rbe diff --git a/science/libtensorflow1/files/patch-configure.py b/science/libtensorflow1/files/patch-configure.py new file mode 100644 index 000000000000..26abc48aad9d --- /dev/null +++ b/science/libtensorflow1/files/patch-configure.py @@ -0,0 +1,11 @@ +--- configure.py.orig 2021-01-04 20:18:42 UTC ++++ configure.py +@@ -475,7 +475,7 @@ def check_bazel_version(min_version, max_version): + print('Cannot find bazel. Please install bazel.') + sys.exit(0) + curr_version = run_shell( +- ['bazel', '--batch', '--bazelrc=/dev/null', 'version']) ++ ['bazel', '--batch', '--output_user_root=/tmp/.bazel', '--bazelrc=/dev/null', 'version']) + + for line in curr_version.split('\n'): + if 'Build label: ' in line: diff --git a/science/libtensorflow1/pkg-descr b/science/libtensorflow1/pkg-descr new file mode 100644 index 000000000000..7496c294f72a --- /dev/null +++ b/science/libtensorflow1/pkg-descr @@ -0,0 +1,9 @@ +TensorFlow is an end-to-end open source platform for machine learning. It has a +comprehensive, flexible ecosystem of tools, libraries, and community resources +that lets researchers push the state-of-the-art in ML and developers easily +build and deploy ML-powered applications. The TensorFlow C API is typically a +requirement of TensorFlow APIs in other languages such as Go and Rust. + +This is version 1 of the API, which is deprecated but still widely used. + +WWW: https://www.tensorflow.org/install/lang_c diff --git a/science/libtensorflow1/pkg-plist b/science/libtensorflow1/pkg-plist new file mode 100644 index 000000000000..18c6131f79fd --- /dev/null +++ b/science/libtensorflow1/pkg-plist @@ -0,0 +1,16 @@ +@dir include/tensorflow +@dir include/tensorflow/c +@dir include/tensorflow/c/eager +include/tensorflow/c/c_api_experimental.h +include/tensorflow/c/c_api.h +include/tensorflow/c/eager/c_api.h +include/tensorflow/c/tf_attrtype.h +include/tensorflow/c/tf_datatype.h +include/tensorflow/c/tf_status.h +include/tensorflow/c/tf_tensor.h +lib/libtensorflow.so +lib/libtensorflow.so.1 +lib/libtensorflow.so.%%SOVERSION%% +lib/libtensorflow_framework.so +lib/libtensorflow_framework.so.1 +lib/libtensorflow_framework.so.%%SOVERSION%%