Pulse Audio: Meson build failing - pulseaudio

First step I cloned the pulseaudio source from git [ git clone https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git ]. Secondly went inside the pulseaudio directory and executed meson build command in order to move to the build directory as stated in README file. But i'm getting this error while excecuting this meson build command.
androidbuild#androidbuild-PC:~/pulse/pulseaudio$ (master) meson build
The Meson build system
Version: 0.45.1
Source dir: /home/androidbuild/pulse/pulseaudio
Build dir: /home/androidbuild/pulse/pulseaudio/build
Build type: native build
meson.build:345:61: ERROR: Expecting eol got eol_cont.
if cc.has_header_symbol('sys/syscall.h', 'SYS_memfd_create') \
^
A full log can be found at /home/androidbuild/pulse/pulseaudio/build/meson-logs/meson-log.txt

Likely Meson began silently supporting using \ escaped newlines sometime after meson 0.45.1 (the version you have installed). Looking at the gitlab, pulse audio requires meson >= 0.50 anyway, so this should have failed already. Since you have 0.45 I'm assuming your on an LTS of some kind (since 0.58 is the latest release), I think Ubuntu 20.04 had 0.45?.
This issue will likely be resolved by updating to a newer meson. You can use pip for this, pip install --user meson, or you can probably use a backport repo for your distro (Debian and Ubuntu both provide these in easy to use forms, but all LTS distros have them as some of the dependencies they need will rely on newer build tools)

Related

Unable to build Windows toolchain from Yocto

I am attempting to build a Windows toolchain from Yocto (running on Linux) so that we can use a different build system to build applications for our embedded device. Yocto is running on Ubuntu 18.04.
I looked at Can't generate SDK for Windows with Yocto and How do I generate a toolchain for Windows using Yocto? and have added meta-mingw to my Yocto work directory; I am running Yocto Zeus, so I cloned it with command git clone git://git.yoctoproject.org/meta-mingw -b zeus and added it to my bblayers.conf file. I also added SDK_ARCH = "x86_64" to my local.conf
I am building the toolchain by running bitbake meta-toolchain. I am trying to build a set of 64 bit binaries (we have had out of memory issues with our existing 32-bit Linaro toolchain).
I am seeing the install script as you would expect in /home/gen-ccm-root/workdir/tools/poky/build-dev/tmp/deploy/sdk but all the binaries it built were Linux ELF files. What step am I missing? I didn't see how to do this in the Yocto SDK manual (https://www.yoctoproject.org/docs/3.0/sdk-manual/sdk-manual.html) Is there a different document I should be looking at?
A couple of other things I have tried:
Changing SDK_ARCH in my local.conf to SDK_ARCH = "x86_64-mingw64" which didn't rebuild anything (after I built the Linux toolchain above)
Adding #SDKMACHINE ?= "x86_64-mingw64" to the local.conf
I tried mingw32 as well since that is what is in the layer conf.
meta-toolchain doesn't appear to work anymore.
In the end, I added meta-mingw to my bblayers.conf and the following to my local.conf:
SDKMACHINE = "x86_64-mingw32"
SDK_ARCHIVE_TYPE = "zip"
And, after building building my project, used the following to build the SDK: bitbake mi-dev -c populate_sdk where mi-dev is my build.

vscode assistance with building cpptools needed

Ubuntu 18.04 ARM64
I have download and built vscode and this appears to be working.
I can see the extension market place and install extensions. The C/C++ IntelliSense, debugging, and code browsing install but gets a dependency install failure sometimes:
Updating C/C++ dependencies...
Downloading package 'Mono Framework Assemblies' (5368 KB) Done!
Installing package 'Mono Framework Assemblies'
Failed at stage: installPackages
Error: end of central directory record signature not found
It seems to succeed on the second attempt but I'm not convinced.
So I have cloned vscode-cpptools and would like to built it myself but I'm not sure what dependencies it has or how to build it correctly.
Any tips appreciated!
So following the build and debug guide at:
$ git clone -b release https://github.com/Microsoft/vscode-cpptools
$ cd vscode-cpptools/Extension
$ npm install ! should install all dependencies but it forgets gulp
$ npm install gulp ! Manually install. I wonder what else it forgets
$ vsce package ! Should trigger the build and make the vsix package.
So the package is created and when I try and install it via the vscode extensions I get
Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: Missing binary at ~/.vscode-oss-dev/extensions/ms-vscode.cpptools-0.22.1/bin/Microsoft.VSCode.CPP.Extension.linux.
Me thinks there are a lot of other dependencies that are missing!!!
Looking in the Extension bin folder and two important binaries are missing:
Microsoft.VSCode.CPP.Extension.linux
Microsoft.VSCode.CPP.IntelliSense.Msvc.linux
I also tried this on Intel Ubuntu 18.04 and while the Intel build appeared to do a whole lot more it also fails to build the binaries.
Found the answer in here : github.com/Microsoft/vscode-cpptools/issues/429 which indicates there is no support for Aaarch64 Arm64 at this point in time.

Specify RPM build order in mock

TLDR: Ensure to keep system OS up-to-date to help ensure consistency with current spec files.
Symptom
When rebuilding PostgreSQL 11.1 SRPM using mock, the build fails with:
BUILDSTDERR: /builddir/build/BUILD/postgresql-11.1/src/bin/psql/command.c:1814 undefined reference to `PQencryptPasswordConn`
NB: PQencryptPasswordConn is a libpq.so function (provided by postgresql-devel-10.3-5.fc27.x86_64 on my system...outside the mock chroot environment). Unless I'm mistaken, the Postgresql SRPM builds the postgresql-devel RPM along with others.
Steps to reproduce
I ran the following to rebuild the SRPM before attempting to apply any patches not already present in the SRPM:
# Obtain SRPM source
git clone https://src.fedoraproject.org/rpms/postgresql.git
cd postgresql
# Download local copies of SRPM sources
wget $(spectool -S *.spec | awk '/^Source.*:\/\//{IFS=" "; print $2}')
# ...check SHAs of downloaded sources...
# Run SRPM-specific prep scripts
./generate-pdf.sh
./generate-sources.sh
# Generate the SRPM
mock --root=fedora-27-x86_64 --resultdir="./SRPMS" --buildsrpm --spec postgresql.spec --sources .
# >>> Everything seems to work fine up to this point <<<
# Build the RPM inside mock chroot
mock --root=fedora-27-x86_64 --rebuild ./SRPMS/postgresql-11.1-4.fc27.src.rpm
# !!! Fail here (with symptom above) !!!
The Problem
I have so far been unable to have mock load the appropriate libpq library headers into the chroot environment to make sure rpmbuild builds against the libpq that contains the PQencryptPasswordConn header (which appears to exist on my system outside the build environment):
grep -lr "PQencryptPasswordConn" /usr/include
# /usr/include/libpq-fe.h
grep -lr "PQencryptPasswordConn" /var/lib/mock/fedora-27-x86_64/root/usr/include
# (Nothing returned)
When reviewing mock's installed_pkgs.log, the following were installed (the latter of which I expect would provide a version of libpq headers):
postgresql-libs-9.6.10-3.fc27.x86_64
postgresql-devel-9.6.10-3.fc27.x86_64
However, I cannot find a way to install the postgresql-* packages into the chroot environment that contain the updated library headers.
The Ask
Since postgresql SRPM is supposed to build postgresql-devel RPM, I think that mock will need to build and install the postgresql-devel RPM in the chroot before rpmbuild attempts to compile psql/command.c so that the latter compilation finds the appropriate library headers (unless the build process is intelligent enough to identify new libraries currently under build).
How can I best accomplish this (would prefer to avoid multiple mock calls for each RPM package built from the SRPM unless that's the only way to go)?
Please note that the build process on my system spawns multiple processes to parallel compilations.
I have also tried to use mockchain —recurse without success.
System Info
Linux 4.16.6-202.fc27.x86_64
First hint, you use the latest postgresql.spec version, but you try to build it against rather old (in fact unsupported nowadays) version 27 of Fedora distribution. I'd encourage you to migrate to a newer version of Fedora, or at least checkout the branch f27 in the same RPM git repository.
Second hint, we changed the layout of PostgreSQL packaging in Fedora 30+. We've cut out the library (libpq.so) into separate package, per announcement.
How to continue; always checkout appropriate branch based on what Fedora you build against, and adjust the spec file appropriately (checkout f27 and update to PostgreSQL 11.1 in this case).
JFTR (might help), there already is a testing modular build of PostgreSQL 11 against Fedora 28+, and the build scripts are maintained in separate branch stream-postgresql-11. With a bit of luck, you would be able to build that branch against old Fedora 27, too. Note that this version of postgresql.spec file is a little bit complicated (it needs to be because we build it against different versions of Fedora).

error: SERVER does not appear in AM_CONDITIONAL

I am trying to install Lustre on CentOS 7. I followed this link. When I try to run sh ./autogen.sh to generate the configure script I get the above error as illustrated below.
[root#localhost lustre-release]# sh ./autogen.sh
configure.ac:10: installing 'config/config.guess'
configure.ac:10: installing 'config/config.sub'
configure.ac:12: installing 'config/install-sh'
configure.ac:12: installing 'config/missing'
autoMakefile.am:127: error: SERVER does not appear in AM_CONDITIONAL
libcfs/libcfs/autoMakefile.am: installing 'config/depcomp'
Does anyone know how I can resolve this?
To build lustre from git use "autogen.sh" in the top level directory to setup the build environment:
$ bash autogen.sh
libcfs/libcfs/autoMakefile.am: installing 'config/depcomp'
$
Did you try downloading a pre-built package from https://downloads.whamcloud.com/public/lustre/ ? That is usually the easiest compared to building your own.
If you want to build your own Lustre code, which version of the source are you using? The latest code is available at git.whamcloud.com. Most users should use the LTS release (b2_10 branch currently), but if you are doing new development you should use the master branch.

Error F_SETLK when building bazel on CentOS 6.5

I am working on building and installing tensorflow on my institution's cluster computer, which is running CentOS 6.5.
Obviously, the first step is building and installing bazel. The build works just fine, but when I try to run the bazel binary, I get the following error:
Error: unexpected result from F_SETLK: Function not implemented
gcc version is 4.7.2
java version is jdk1.8.0_65
edit: I have also tried compiling gcc 4.9.4 and building with this version, and I have tried building both the latest dist of bazel, and the 0.3.1 from the git repo. All variants get the same error.
This happens if the filesystem where Bazel tries to install itself (unpack its embedded tools) doesn't support locking.
Workaround (until the relevant issue is resolved) is to specify a path on a local, writable (and file-lockable) filesystem for --output_user_root, for example:
bazel --output_user_root=/usr/local/$USER/bazelout build <targets>