fortran compilation by cmake
libint: more optimisations for SSE
libint: avx switching based ony system configuration
libint: split into 2 derivations
libint: conditional fortran
libint: parallel building by default
libint: remove rec statement from mkDerivation
There is no new release yet (see mailing list post on oss-security), so
I'm picking the commit that fixes the CVE.
There is another security flaw (without a CVE number) that is also
mentioned in the oss-security announcement but it is not explained which
commit patches the problem.
Previously, libcef did not actually support i686!! It compiled against a
64 bit chromium, which may have actually worked on CI but it would not
work so well on an actual 32 bit machine.
The TARGET_ARCH cmake variable is used to specify the host OS, which if
unspecified defaults to the same as the build OS. So to crosscompile
aws-sdk-cpp to another OS, the TARGET_ARCH variable must be specified.
Example hydra failure: https://hydra.nixos.org/build/149290553/nixlog/3
* Change from fetchzip to fetchFromGitea.
* Set `mesonBuildType` instead of supplying the --build-type=
argument in `mesonFlags` as the build type option will be
repeated.
* Abstact optional flag declaration with a helper function.
* Add upstream changelog.
There is an edge case when cross compiling where the auto detection
script would not correctly recognize the compiler (as it is only
good at recognizing native compilers, really, which we don't have
anymore since we don't need the build->build one anymore).
If bootstrap.sh doesn't detect the compiler correctly, it'll generate
a project-config.jam with a syntax error which breaks the build in a
hard to spot way: only a warning is displayed after configuring, the
build will appear to run normally until it fails quietly just before
installing. By providing it explicitly, we can prevent this.
If we build two things in one derivation, it becomes more complicated
and its build time is extended. Therefore we should avoid this if
possible. There's a good opportunity for this with boost: We have
boost-build packaged already. This has the additional benefit that
we can get rid of $CC_FOR_BUILD entirely in boost, meaning we don't
need to rely on (as many) hacks to make boost understand our way of
cross compiling.
Unfortunately boost-build is not backwards compatible, so we need to
build a specific boost-build for each boost derivation (the number
could probably be reduced, but I'm not interested in testing a lot
of boost builds at the moment).
Additionally we fix a few cross compilation problems:
- boost couldn't cope with different types of compilers for native
and cross (as happens if useLLVM is true). Since we only use one
of them per derivation, this is no longer an issue.
- boost didn't find the cross ar and ranlib for compilation (since
it doesn't check $AR or $RANLIB). Instead it used plain ar and
ranlib form $PATH which were the native ones before. This is now
fixed by setting these tools explicitly in user-config.jam (and
no longer providing the native tools).
With these changes, pkgsLLVM.boost builds.
On darwin, instead of patching the clang-darwin.jam definition, we
instead supply -rpath $out/lib via <linkflags> which causes the
correct directory to be added to the libraries' rpaths, so that
they find each other.
gnatcoll-sql: init at 21.0.0
gnatcoll-sqlite: init at 21.0.0
gnatcoll-xref: init at 21.0.0
gnatcoll-postgres: init at 21.0.0
gnatcoll-db2ada: init at 21.0.0
gnatinspect: init at 21.0.0
Ada database interaction libraries and related tools which are managed
in the gnatcoll-db repository. The attribute and derivation names
don't include "db" since the GPR project files upstream also don't:
They are named `gnatcoll_${component}.gpr` usually, except for the
executables.
gnatcoll-gmp: init at 21.0.0
gnatcoll-iconv: init at 21.0.0
gnatcoll-lzma: init at 21.0.0
gnatcoll-omp: init at 21.0.0
gnatcoll-python3: init at 21.0.0
gnatcoll-readline: init at 21.0.0
gnatcoll-syslog: init at 21.0.0
gnatcoll-zlib: init at 21.0.0
This inits a bunch of gnatcoll-* packages which are managed in the
gnatcoll-bindings repository. I have chosen not to include "bindings"
in their derivation or attribute names, since the GPR project
definitions themselves all don't contain that as well, instead they
are name `gnatcoll_${component}.gpr`.
GPRbuild is a multi language build system developed by AdaCore which
is mostly used for build Ada-related projects using GNAT.
Since GPRbuild is used to build itself and its dependency library
XML/Ada we first build a bootstrap version of it using the provided
bash build script bootstrap.sh as the gprbuild-boot derivation.
gprbuild-boot is then used to build xmlada and the proper gprbuild
derivation.
GPRbuild has its own search path mechanism via GPR_PROJECT_PATH which
we address via a setupHook. It currently works quite similar to the
pkg-config one: It accumulates all inputs into GPR_PROJECT_PATH,
GPR_PROJECT_PATH_FOR_BUILD etc. However this is quite limited at the
moment as we don't have a gprbuild wrapper yet which understands the
_FOR_BUILD suffix. However, we'll need to address this in the future
as it is currently basically impossible to test since the distinction
only affects cross-compilation, but it is not possible to build a GNAT
cross-compiler in nixpkgs at the moment (I'm working on changing that,
however).
Another issue we had to solve was GPRbuild not finding the right GNAT
via its gprconfig tool: GPRbuild has a knowledge base with compiler
definitions which run some checks and collect info about binaries
which are in PATH. In the end the first compiler in PATH that supports
the desired language is selected.
We want GPRbuild to discover our wrapped GNAT since the unwrapped one
is incapable of producing working binaries since it won't find the
crt*.o objects distributed with libc. GPRbuild however needs to find
the Ada runtime distributed with GNAT which is not part of the wrapper
derivation, so it will skip the wrapper and select the unwrapped GNAT.
Symlinking the unwrapped's lib directory into the wrapper fixes this
problem, but breaks linking in some cases (e. g. when linking against
OMP from gcc, the runtime variant will shadow the problem dynamic lib
from buildInputs). Additionally it uses gnatls as an indicator it has
found GNAT which is not part of the wrapper.
The solution we opted to adopt here is to install a custom compiler
description into gprbuild's knowledge base which properly detects the
nixpkgs GNAT wrapper: It uses gnatmake to detect GNAT instead of
gnatls and discovers the runtime via a symlink we add to
`$out/nix-support`. This additional definition is enough to properly
detect GNAT, since the plain wrapped gcc detection works out of the
box. It may, however, be necessary to add special definitions for
other languages in the future where gprbuild also needs to discover
the runtime.
One future improvement would be to install libgpr into a separate
output or split it into a separate derivation (which would require to
link gprbuild statically always since otherwise we end up with a
cyclical dependency).
Overview of changes in libmbim 1.26
----------------------------------------
* Build now requires GLib/GObject/GIO 2.56.
* The GUdev optional build/runtime requirement is now fully dropped, it's no
longer used.
* Building from git no longer requires autoconf-archive, the needed AX_ macros
are now shipped inside m4/.
* In addition to building from a source release tarball, or building from git
checkouts using the GNU autotools suite (autoconf/automake/libtool), this
release includes the initial support for the meson build system. The meson
port is not fully complete yet, as there are some missing things in the doc
generation steps, but for system integration or development purposes, the
port should be fully operational. This major release, including all its
stable updates in the 1.26.x series, will be the last ones providing support
for GNU autotools. The next major release will likely be a meson-only one,
and will therefore not be based on a source release tarball any more, but
on specific git tags instead.
* Implemented new link management operations, exclusively for the cdc_mbim
driver for now. These new operations allow creating or deleting VLAN network
interfaces in order to run multiplexed data sessions over one single physical
network interface.
* Added support for the Microsoft-defined SAR service, including the following
operations:
** MBIM_CID_MS_SAR_CONFIG
** MBIM_CID_MS_SAR_TRANSMISSION_STATUS
* Added support for the Microsoft-defined UICC Low Level Access service,
including the following operations:
** MBIM_CID_MS_UICC_LOW_LEVEL_ACCESS_ATR
** MBIM_CID_MS_UICC_LOW_LEVEL_ACCESS_OPEN_CHANNEL
** MBIM_CID_MS_UICC_LOW_LEVEL_ACCESS_CLOSE_CHANNEL
** MBIM_CID_MS_UICC_LOW_LEVEL_ACCESS_APDU
** MBIM_CID_MS_UICC_LOW_LEVEL_ACCESS_TERMINAL_CAPABILITY
** MBIM_CID_MS_UICC_LOW_LEVEL_ACCESS_RESET
* Added support for the Qualcomm-defined QDU service, including the following
operations:
** MBIM_CID_QDU_UPDATE_SESSION
** MBIM_CID_QDU_FILE_OPEN
** MBIM_CID_QDU_FILE_WRITE
* Extended the Microsoft-defined Basic Connect Extensions service, including
the following operations:
** MBIM_CID_MS_BASIC_CONNECT_EXTENSIONS_DEVICE_CAPS
** MBIM_CID_MS_BASIC_CONNECT_EXTENSIONS_SYS_CAPS
** MBIM_CID_MS_BASIC_CONNECT_EXTENSIONS_SLOT_INFO_STATUS
** MBIM_CID_MS_BASIC_CONNECT_EXTENSIONS_DEVICE_SLOT_MAPPINGS
* libmbim-glib:
** Logic updated to make sure full packets are written at once, instead of
writing them in chunks.
** Updated the "LTE attach status" APIs in order to avoid creating unneeded
struct types in the interface. The older methods have been deprecated and
maintained in the library for compatibility purposes only.
* mbim-proxy:
** Internal buffer size updated from 512 bytes to 4096 bytes.
* mbimcli:
** New '--ms-set-sar-config' and '--ms-query-sar-config' actions.
** New '--ms-set-transmission-status' and '--ms-query-transmission-status'
actions.
** Updated '--enter-pin', '--disable-pin' and '--unlock-pin' to allow other
PIN types, not just assuming PIN1.
** New '--link-add', '--link-delete', '--link-list' and '--link-delete-all'
actions.
** New '--ms-query-sys-caps' action.
** New '--ms-query-slot-info-status' action.
** New '--ms-query-device-slot-mappings' and '--ms-set-device-slot-mappings'
actions.
** Renamed '--ms-query-lte-attach-status' to '--ms-query-lte-attach-info',
and kept the old name for compatibility purposes.
* mbim-network:
** When using the mbim-proxy, skip trying to manage the MBIM session and
transaction ids as that is implicitly done by the proxy already.
* Several other minor improvements and fixes.
The following features which were backported to 1.24.x releases are also present
in libmbim 1.26.0:
* Fixed merged subscribe list reporting and handling in the proxy.
* Fixed transaction id handling when multiple fragments are involved.
* Fixed read overflows on malformed messages.
* Skip warnings if descriptors file cannot be read, as in new MBIM backends
other than cdc_mbim.
graphite2 needs to link against libgcc. If stdenv.cc.isGNU this always
works, but for clang based stdenvs, the build would fail. We can pull in
the standalone libgcc derivation in those cases.
I couldn't find any alternative to setting _gRPC_PROTOBUF_PROTOC_EXECUTABLE.
protobuf.cmake uses find_program when cross-compiling, which finds the
host platform's protoc instead of the build platform's. I even tried
giving protobuf multiple outputs and not including the one with the
binary in buildInputs, but it didn't help.
All libcanberra/libcanberra-gtk2/libcanberra-gtk3 packages were marked
as broken on commit 806d814516 (libcanberra: mark broken on darwin,
2021-02-11), but only libcanberra-gtk3 is broken due to the missing
header.
This commit refactors how to enable GTK support, to mark just
libcanberra-gtk3 as broken and allow building libcanberra and
libcanberra-gtk2.
libcanberra builds but the linker fails with:
ld: file not found: /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon for architecture x86_64
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
Adding Carbon to the inputs solves the problem.
libcanberra-gtk2 builds and the linker finishes without the above error,
most likely because it depends on gtk2 and gtk2 depends on Cocoa.
Also fix some issues with the derivation:
- Use pname/version instead of name.
- Use lib.optionalString to set postPatch.
- Only set passthru if building with GTK support, and ensure that the
proper directory is passed for each GTK version.