Webkit not found on OSX - macos

I'm trying to compile mu that uses the headers webkit/webkitwebview.h and webkit/webkitwebresource.h. The OSX version of webkit framework located in /System/Library/Frameworks doesn't seem to have it, the headers are different and use NS data types and stuff.
So I downloaded webkit-gtk with MacPorts (since it's not available through Homebrew) and pointed $PKG_CONFIG_PATH to webkit-1.0.pc. I verified and this version has the needed headers.
But the problem is, I still get an error, the configure file doesn't seem to be able to find it.
checking for WEBKIT... no
I don't even know, actually, if webkit-1.0.pc is the package config it is looking for.
I had two other compilation problems prior to this, with glib.h and gtk.h but managed to go through. This is the last issue I need to resolve to have a fully functional email client in Emacs.
Help!

this worked for me [1]:
add this to ~/.profile (or wherever you take care of this stuff):
# ~/.profile stuff
export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig/:$PKG_CONFIG_PATH"
then source:
$ source ~/.profile
then (assuming you're in the mu dir) voila [2]:
$ ./configure
[1] i have gtk installed via homebrew, installed webkit-gtk3 via macports, and cloned mu from the github repo. running os x 10.9.5
[2] here's the $ ./configure output:
mu configuration is complete.
------------------------------------------------
mu version : 0.9.10
Xapian version : 1.2.19
GLib version : 2.42.1
GMime version : 2.6.20
GTK+ version : 3.14.5
Webkit version : 2.4.7
Emacs version : GNU Emacs 24.4.51.1
Have wordexp : yes
Build mu4e emacs frontend : yes
Build 'mug' toy-ui (gtk+/webkit) : yes
McCabe's Cyclomatic Complexity tool : no
Have direntry->d_ino : yes
Have direntry->d_type : yes
------------------------------------------------

Related

Buildroot error when building with Ubuntu 21.10

I am trying to compile linux for RISCV Arch using buildroot(busybox). I was using 18.04 and 20.04 previously and had no issues compiling it. Right now, I have upgraded it to 21.10 for building some other stuffs. I have moved my toolchain and I can find it using the which command. When I try to compile linux I get some error which I havn't faced in the earlier versions.
>>> host-m4 1.4.18 Building
In file included from /usr/include/signal.h:328,
from ./signal.h:52,
from c-stack.c:49:
c-stack.c:55:26: error: missing binary operator before token "("
55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
| ^~~~~~~~
CC closein.o
c-stack.c:134:8: error: variably modified 'buffer' at file scope
134 | char buffer[SIGSTKSZ];
| ^~~~~~
CC closeout.o
I am confused on how different versions can cause this error.
Thanks in advance.
It looks like you have hit a change in GNU C Library version 2.34 that can make SIGSTKSZ non-constant.
From the GNU C Library 2.34 release announcement:
Add _SC_MINSIGSTKSZ and _SC_SIGSTKSZ. When _DYNAMIC_STACK_SIZE_SOURCE or _GNU_SOURCE are defined, MINSIGSTKSZ and SIGSTKSZ are no longer constant on Linux. MINSIGSTKSZ is redefined to sysconf(_SC_MINSIGSTKSZ) and SIGSTKSZ is redefined to sysconf (_SC_SIGSTKSZ). This supports dynamic sized register sets for modern architectural features like Arm SVE.
A possible workaround is to configure buildroot to build host-m4 version 1.4.19 instead of 1.4.18, because it no longer uses SIGSTKSZ.
I saw that error when building on Ubuntu 22.04 for an embedded Linux board using Buildroot. It got stuck when building the host-m4 package. #Ian Abbott is right:
A possible workaround is to configure buildroot to build host-m4 version 1.4.19 instead of 1.4.18, because it no longer uses SIGSTKSZ.
In Buildroot, to update from m4 v 1.4.18 to 1.4.19, simply grab the latest files here: https://github.com/buildroot/buildroot/tree/master/package/m4
As of right now (9 Jan. 2023), the upstream Buildroot m4 version there is
1.4.19, as shown here: https://github.com/buildroot/buildroot/blob/master/package/m4/m4.mk#L7:
################################################################################
#
# m4
#
################################################################################
M4_VERSION = 1.4.19
M4_SOURCE = m4-$(M4_VERSION).tar.xz
M4_SITE = $(BR2_GNU_MIRROR)/m4
M4_LICENSE = GPL-3.0+
M4_LICENSE_FILES = COPYING
$(eval $(host-autotools-package))
How to upgrade/update any buildroot package to the latest upstream version, from the command-line
Here is an example of how to upgrade any buildroot package from the command-line. In these commands, I am upgrading the m4 package, to solve the problem in the OP's question. Change the word m4 in all 3 places to the name of the package you'd like to update:
# initially:
cd path/to/buildroot
git remote add upstream https://github.com/buildroot/buildroot.git
git fetch upstream master
# then (from within the "buildroot" repo or subrepo)
rm -r package/m4
git checkout upstream/master -- package/m4
git add -A
git status
git commit -m "Update m4 library"

Compile nginx 1.8.1 with http_perl_module

I need help compiling nginx with the perl_module on my Mac:
System Software Overview:
System Version: OS X 10.11.1 (15B42)
Kernel Version: Darwin 15.0.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: Philipp
User Name: XXXXXXX XXXXXXXX (philipp)
Secure Virtual Memory: Enabled
Time since boot: 4 days 22:46
I configure nginx to be compiled with PCRE and PERL, i.e.,:
./configure --with-pcre=/Users/philipp/downloads/pcre-8.38 --with-http_perl_module --prefix=/servers/nginx
The output of the configure states:
checking for perl
+ perl version: This is perl 5, version 18, subversion 2 (v5.18.2)
built for darwin-thread-multi-2level
+ perl interpreter multiplicity found
If I execute make I run into the following error:
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I googled and found a hint to export KERNEL_BITS=64, which did not solve the problem. Any suggestions on how to compile nginx with perl. The compilation succeeds without the --with-http_perl_module option, but in that case I cannot use perl in the nginx.conf (of course :)).
UPDATE:
I was not able to compile nginx with perl. I ended up using a pre-compiled package, which is kind of unsatisfying, because now I have to deal with a lot of packages I don't like. Anyways, if someone has a solution I'd be more than happy to know.
I'm not sure if this is offtopic or not, but as it's about using perl within nginx (which I do, and is awesome).
I had a similar problem when trying to build this module. The root of it was that I hadn't got the right LD flags.
The easiest way of doing this - IMO - is install nginx from a package, run nginx -V and see what flags were used - copy them all, and include the extras. (And check it wasn't already build in your distribution - it was in mine, which I think was a Centos 7.2 package - I don't have it to hand, but I'm not sure it would necessarily help)
You may also need to install a new perl version, to go with it though.
--with-pcre=../modules/pcre-8.38
--with-openssl=../modules/openssl-1.0.2g
--prefix=/usr/local/nginx
--with-http_perl_module
--with-http_ssl_module
--with-http_addition_module
--with-http_sub_module
--with-http_realip_module
--with-http_stub_status_module
--with-cc-opt='-I /usr/local/include'
--with-ld-opt='-L /usr/local/lib -L/usr/local/opt/perl518/lib'
I got the same problem. after about 3 hours digging with this, finally solved. This is my configure file, i installed perl518 with brew located in /usr/local/opt/perl518/lib, and use the newest nginx source code of version nginx version: nginx/1.10.0.
Things seems happend as #Sobrique said, you need to give the right --with-ld-opt & --with-cc-opt.
important, after ./configure, DO NOT doing make immediately, vi ./objs/Makefile and modify openssl config from './config' to './Configure darwin-x86_64-cc' so that it can build openssl in x86_64 mod.
Hope it can help you!

Installing Cairo on Mac - Could not find libpng in the pkg-config search path

checking whether cairo's PNG functions feature could be enabled... no
I have been following the setup for configuring node canvas. Cairo is needed but i am having issues trying to set it up. https://github.com/Automattic/node-canvas/wiki/Installation---OSX
If libpng fails and you get the error "error: recommended PNG functions feature could not be enabled", try installing this binary and re-running the configure step.
I followed above by installing the binaries on Mac OS 9 and run the configuration command and still no luck. I am running the install shell script in node-canvas repository:
https://github.com/Automattic/node-canvas/blob/master/install
In my /usr/local/lib I currently have:
dtrace libjpeg.8.dylib libpng.a libpng14.a
libfreetype.6.dylib libjpeg.a libpng.dylib libpng14.dylib
libfreetype.a libjpeg.dylib libpng.la libpng14.la
libfreetype.dylib libjpeg.la libpng12.0.dylib libpng15.15.dylib
libfreetype.la libpixman-1.0.dylib libpng12.0.dylib.dSYM libpng15.15.dylib.dSYM
libgif.4.1.6.dylib libpixman-1.a libpng12.a libpng15.a
libgif.4.dylib libpixman-1.dylib libpng12.dylib libpng15.dylib
libgif.a libpixman-1.la libpng12.la libpng15.la
libgif.dylib libpng.3.dylib libpng14.14.dylib node_modules
libgif.la libpng.3.dylib.dSYM libpng14.14.dylib.dSYM pkgconfig
Libpng-1.6.10 has been replaced by libpng-1.6.12.
In your install script, change
LIBPNG="http://downloads.sourceforge.net/project/libpng/libpng16/1.6.10/libpng-1.6.10.tar.gz"
to
LIBPNG="http://downloads.sourceforge.net/project/libpng/libpng16/1.6.12/libpng-1.6.12.tar.gz"
I have a set of detailed instructions for building cairo here:
https://github.com/soegaard/racket-osx-libs
There resulting libraries are here:
https://github.com/soegaard/racket-osx-libs/tree/master/lib

Error in Installing the Cairo R Package

I am attempting to install the Cairo package in the development version of R on Mac OS X 10.7.4, but I'm running into an issue that I cannot resolve.
I have installed Cairo with homebrew (i.e., brew install cairo) and received the following message:
==> Caveats This formula is keg-only, so it was not symlinked into /usr/local.
Mac OS X already provides this program and installing another version
in parallel can cause all kinds of trouble.
The Cairo provided by Leopard is too old for newer software to link
against.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add its lib
& include paths to your build variables:
LDFLAGS -L/usr/local/Cellar/cairo/1.12.2/lib
CPPFLAGS -I/usr/local/Cellar/cairo/1.12.2/include
With the above message in mind, I attempted to install the Cairo package from R-Forge with the following R command:
install.packages("Cairo", repos="http://www.rforge.net/", configure.args = c("CAIRO_LIBS=/usr/local/Cellar/cairo/1.12.2/lib", "CAIRO_CFLAGS=/usr/local/Cellar/cairo/1.12.2/include/cairo"))
I receive the following error:
checking cairo.h usability... no
checking cairo.h presence... no
checking for cairo.h... no
configure: error: Cannot find cairo.h!
Please install cairo (http://www.cairographics.org/) and/or set
CAIRO_CFLAGS/LIBS correspondingly. ERROR: configuration failed for package ‘Cairo’
I repeated the same command without the repos argument (by default, I use the FHCRC mirror) with the same result.
At this point, the problem seems obvious: the file cairo.h is not present. But then I listed the files in the include/cairo directory. Here's the response:
ls /usr/local/Cellar/cairo/1.12.2/include/cairo
cairo-deprecated.h cairo-ft.h
cairo-ps.h
cairo-script-interpreter.h
cairo-svg.h
cairo-xcb.h
cairo-xlib.h
cairo-features.h
cairo-pdf.h
cairo-quartz.h
cairo-script.h
cairo-version.h
cairo-xlib-xrender.h
cairo.h
So, I'm pointing the installation of the Cairo package to the appropriate place, but the error persists. I have tried variations, such as CAIRO_CFLAGS=/usr/local/Cellar/cairo/1.12.2/include, with no luck.
Thoughts? Any help you can provide is greatly appreciated.
In case it's necessary, here is my sessionInfo:
R Under development (unstable) (2012-08-08 r60208) Platform: x86_64-apple-darwin11.4.0 (64-bit)
locale: [1]
en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages: [1] stats graphics grDevices utils
datasets methods base
other attached packages: [1] BiocInstaller_1.5.12
loaded via a namespace (and not attached): [1] tools_2.16.0
I had similar issue with cairo config error, and I already installed cairo with homebrew. Try below
brew install pkg-config
This solved mine problem.
A coworker and I just fixed the problem by ignoring all of what I typed above. Rather, we installed Cairo and all of its dependencies from source manually, thereby bypassing the usage of brew or variants like port. This worked like a charm, so I am not entirely sure what was wrong above.
After trying everything listed here, I found this blog post about installing the "full R package" using brew: https://luispuerto.net/blog/2018/05/11/installing-r-with-homebrew-with-all-the-capabilities/
What finally worked for me was building R explicitly with cairo (brew's default R tap uses --without-cairo and simply editing the tap did not solve the issue for me).
Works like a charm for me with R 4.0.2, cairo 1.16.0_3 under macOS Catalina 10.15.6.

How do I get the Haskell Platform's ghc-pkg to work on MAC OSX

I have installed the latest Haskell Platform for MAC OSX and I get the error "Setup: failed to parse output of 'ghc-pkg dump'" when I do anything with Cabal.
So I looked at my versions:
ralphtq$ ghc-pkg list Cabal
/Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.1/package.conf.d
Cabal-1.8.0.2
ralphtq-mac-mini:cabal-install-0.6.4 ralphtq$ cabal --version
cabal-install version 0.6.2
using version 1.6.0.3 of the Cabal library
This is telling me that even though I have Cabal 1.8 the cabal-instal is at version 0.6.2. I have tried to correct that using darcs to get the latest version of cabal-install, but I cannot get passed the error:
ralphtq$ sh bootstrap.sh
Checking installed packages for ghc-6.12.1...
parsec is already installed and the version is ok.
network is already installed and the version is ok.
Cabal is already installed and the version is ok.
mtl is already installed and the version is ok.
HTTP is already installed and the version is ok.
zlib is already installed and the version is ok.
cleaning...
Linking Setup ...
Configuring cabal-install-0.9.1...
Setup: At least the following dependencies are missing:
Cabal ==1.9.*
It is expecting Cabal to be >= 1.9.
I tried to install a previous version of Cabal but got the following error:
...
...
[50 of 51] Compiling Distribution.Simple ( Distribution/Simple.hs, Distribution/Simple.o )
[51 of 51] Compiling Main ( Setup.hs, Setup.o )
Linking Setup ...
Configuring Cabal-1.6.0.2...
Setup: failed to parse output of 'ghc-pkg dump'
I am back to the same problem.
I have also tried a complete re-install of the platform.
What are my next options? Help appreciated, thx.
Either you have installed an old version of the Haskell Platform, or you have a mixed up environment where you have installed over the top of an existing, older install, and so now have a mixture of ghc-pkg versions from 6.10.x and 6.12.x
Try removing those ghc-pkg and cabal binaries, and then installing the Platform. That way you won't have those old executables lying around.

Resources