Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glib-networking: Fix glib-networking for macOS #33459

Merged
merged 1 commit into from Feb 24, 2018

Conversation

hamishmack
Copy link
Contributor

Motivation for this change

Replaces #33304

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@jtojnar
Copy link
Contributor

jtojnar commented Jan 5, 2018

@GrahamcOfBorg build glib_networking

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success for system: x86_64-darwin

make[3]: Leaving directory '/private/tmp/nix-build-glib-networking-2.54.1.drv-0/glib-networking-2.54.1'
make[2]: Leaving directory '/private/tmp/nix-build-glib-networking-2.54.1.drv-0/glib-networking-2.54.1'
make[1]: Leaving directory '/private/tmp/nix-build-glib-networking-2.54.1.drv-0/glib-networking-2.54.1'
glibPreFixupPhase
post-installation fixup
strip is /nix/store/bhfkh37smh9lc5bngdha6zx98k6w6cgd-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/dlv7bm17g1qmdmxfxz3d8r81gmwpkiaz-glib-networking-2.54.1/lib 
patching script interpreter paths in /nix/store/dlv7bm17g1qmdmxfxz3d8r81gmwpkiaz-glib-networking-2.54.1
strip is /nix/store/bhfkh37smh9lc5bngdha6zx98k6w6cgd-cctools-binutils-darwin/bin/strip
/nix/store/dlv7bm17g1qmdmxfxz3d8r81gmwpkiaz-glib-networking-2.54.1

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success for system: x86_64-linux

shrinking /nix/store/nb4w325yn01pzpjvkd9238mby65raf0i-glib-networking-2.54.1/libexec/glib-pacrunner
shrinking /nix/store/nb4w325yn01pzpjvkd9238mby65raf0i-glib-networking-2.54.1/lib/gio/modules/libgiognomeproxy.so
shrinking /nix/store/nb4w325yn01pzpjvkd9238mby65raf0i-glib-networking-2.54.1/lib/gio/modules/libgiognutls.so
shrinking /nix/store/nb4w325yn01pzpjvkd9238mby65raf0i-glib-networking-2.54.1/lib/gio/modules/libgiolibproxy.so
strip is /nix/store/wxn5gn8amxm1w0ikcx4gbs8a17wvss4j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/nb4w325yn01pzpjvkd9238mby65raf0i-glib-networking-2.54.1/lib  /nix/store/nb4w325yn01pzpjvkd9238mby65raf0i-glib-networking-2.54.1/libexec 
patching script interpreter paths in /nix/store/nb4w325yn01pzpjvkd9238mby65raf0i-glib-networking-2.54.1
checking for references to /tmp/nix-build-glib-networking-2.54.1.drv-0 in /nix/store/nb4w325yn01pzpjvkd9238mby65raf0i-glib-networking-2.54.1...
strip is /nix/store/wxn5gn8amxm1w0ikcx4gbs8a17wvss4j-binutils-2.28.1/bin/strip
/nix/store/nb4w325yn01pzpjvkd9238mby65raf0i-glib-networking-2.54.1

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success for system: aarch64-linux

shrinking /nix/store/xgr3fs299vpndfgjb4lhgzs1xgnadg8m-glib-networking-2.54.1/lib/gio/modules/libgiognutls.so
shrinking /nix/store/xgr3fs299vpndfgjb4lhgzs1xgnadg8m-glib-networking-2.54.1/lib/gio/modules/libgiognomeproxy.so
shrinking /nix/store/xgr3fs299vpndfgjb4lhgzs1xgnadg8m-glib-networking-2.54.1/lib/gio/modules/libgiolibproxy.so
shrinking /nix/store/xgr3fs299vpndfgjb4lhgzs1xgnadg8m-glib-networking-2.54.1/libexec/glib-pacrunner
strip is /nix/store/c6qj0j45xizkrx58i65j75a5ysmqhgrs-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/xgr3fs299vpndfgjb4lhgzs1xgnadg8m-glib-networking-2.54.1/lib  /nix/store/xgr3fs299vpndfgjb4lhgzs1xgnadg8m-glib-networking-2.54.1/libexec
patching script interpreter paths in /nix/store/xgr3fs299vpndfgjb4lhgzs1xgnadg8m-glib-networking-2.54.1
checking for references to /build in /nix/store/xgr3fs299vpndfgjb4lhgzs1xgnadg8m-glib-networking-2.54.1...
strip is /nix/store/c6qj0j45xizkrx58i65j75a5ysmqhgrs-binutils-2.28.1/bin/strip
/nix/store/xgr3fs299vpndfgjb4lhgzs1xgnadg8m-glib-networking-2.54.1

@jtojnar
Copy link
Contributor

jtojnar commented Jan 5, 2018

This is better, though ideally we would also build libproxy on Darwin. https://www.macports.org/ports.php?by=name&substr=libproxy

@hamishmack
Copy link
Contributor Author

This is better, though ideally we would also build libproxy on Darwin.

I got libproxy to build too using those macports patches and have updated this PR and the webkitgtk one (#33307).

@@ -12,22 +12,47 @@ stdenv.mkDerivation rec {
sha256 = "10swd3x576pinx33iwsbd4h15fbh2snmfxzcmab4c56nb08qlbrs";
};

patches = lib.optionals stdenv.isDarwin [
(fetchpatch {
url = https://raw.githubusercontent.com/macports/macports-ports/master/net/libproxy/files/patch-libproxy-cmake.diff;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than master, we probably want to use a specific commit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, do we need every one of these patches? It is not like we are building Qt4 or Perl bindings. It would be nice if you could add a comment with an error produced without each patch.

buildInputs = [ dbus networkmanager spidermonkey_38 pcre python2 python3 ];
buildInputs = [ dbus pcre python2 python3 ]
++ lib.optionals stdenv.isLinux [ networkmanager spidermonkey_38 ]
++ lib.optional stdenv.isDarwin zlib;

preConfigure = ''
cmakeFlagsArray+=(
"-DWITH_MOZJS=ON"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this flag work when we do not provide spidermonkey?


preConfigure = ''
cmakeFlagsArray+=(
"-DWITH_MOZJS=ON"
"-DPYTHON2_SITEPKG_DIR=$out/${python2.sitePackages}"
"-DPYTHON3_SITEPKG_DIR=$out/${python3.sitePackages}"
${lib.optionalString stdenv.isDarwin ''
"-DMP_MACOSX=NO"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are already using ON, so we should use OFF to be consistent.

@@ -9754,9 +9754,6 @@ with pkgs;
};

libproxy = callPackage ../development/libraries/libproxy {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can collapse this to a single line.

"-DMP_MACOSX=NO"
"-DWITH_WEBKIT=NO"
"-DWITH_WEBKIT3=NO"
''}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I would move all the flags except for the ones containing $out to cmakeFlags attribute in the derivation, this is affront to my sense of aesthetics 😉

@@ -24,6 +24,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig intltool ];
propagatedBuildInputs = [ glib gnutls libproxy gsettings_desktop_schemas ];

NIX_LDFLAGS = if stdenv.isDarwin then "-lintl" else null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also use stdenv.lib.optionalString.

@@ -1,5 +1,5 @@
{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake
, dbus, networkmanager, spidermonkey_38, pcre, python2, python3 }:
{ stdenv, lib, fetchFromGitHub, fetchpatch, pkgconfig, cmake
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this should probably be a separate commit.

@hamishmack
Copy link
Contributor Author

I have updated the PR again based on your comments. I left out the two patches that are not really necessary. I'm not really sure why the other patch is needed. I think it is the circular dependency problem described here. That would explain why without it it fails to find JavaScriptCore (since that will be part of webkitgtk).

@hamishmack
Copy link
Contributor Author

@GrahamcOfBorg build glib_networking

@jtojnar
Copy link
Contributor

jtojnar commented Jan 6, 2018

Could you provide the full build log without any patch (especially the MODULES TO BUILD: section). It should not really ask for webkit when we use -DWITH_WEBKIT3=OFF.

@hamishmack
Copy link
Contributor Author

nix-build ./nixpkgs -A libproxy
these derivations will be built:
  /nix/store/blgz1sx70vwlwj3qmapjanl2cjpidm00-libproxy-0.4.15.drv
building path(s) ‘/nix/store/wdrg2rbdfpvhq0irwh6smzxyxnwb68jp-libproxy-0.4.15-dev’, ‘/nix/store/yygy390ryb93pcf6i6qi5sg3mkib86ar-libproxy-0.4.15’
unpacking sources
unpacking source archive /nix/store/25m3x30kpc27v6i2mivjjyip03222xj1-source
source root is source
patching sources
configuring
fixing cmake files...
cmake flags: -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/wdrg2rbdfpvhq0irwh6smzxyxnwb68jp-libproxy-0.4.15-dev/include -DCMAKE_INSTALL_LIBDIR=/nix/store/yygy390ryb93pcf6i6qi5sg3mkib86ar-libproxy-0.4.15/lib -DCMAKE_INSTALL_NAME_DIR=/nix/store/yygy390ryb93pcf6i6qi5sg3mkib86ar-libproxy-0.4.15/lib -DCMAKE_INSTALL_PREFIX=/nix/store/yygy390ryb93pcf6i6qi5sg3mkib86ar-libproxy-0.4.15 -DMP_MACOSX=OFF -DWITH_WEBKIT=OFF -DWITH_WEBKIT3=OFF -DPYTHON2_SITEPKG_DIR=/nix/store/yygy390ryb93pcf6i6qi5sg3mkib86ar-libproxy-0.4.15/lib/python2.7/site-packages -DPYTHON3_SITEPKG_DIR=/nix/store/yygy390ryb93pcf6i6qi5sg3mkib86ar-libproxy-0.4.15/lib/python3.6/site-packages
-- The C compiler identification is Clang 4.0.1
-- The CXX compiler identification is Clang 4.0.1
-- Check for working C compiler: /nix/store/61plv8rx9jvjzk8awp7cxv42gy4g41a6-clang-wrapper-4.0.1/bin/clang
-- Check for working C compiler: /nix/store/61plv8rx9jvjzk8awp7cxv42gy4g41a6-clang-wrapper-4.0.1/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /nix/store/61plv8rx9jvjzk8awp7cxv42gy4g41a6-clang-wrapper-4.0.1/bin/clang++
-- Check for working CXX compiler: /nix/store/61plv8rx9jvjzk8awp7cxv42gy4g41a6-clang-wrapper-4.0.1/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building with bundled libmodman
-- Found Python2Interp: /nix/store/wg2wkr5j9xy3wr8r8dqvvj2wgygcvrvl-python-2.7.14/bin/python (found version "2.7.14") 
-- Using PYTHON2_SITEPKG_DIR=/nix/store/yygy390ryb93pcf6i6qi5sg3mkib86ar-libproxy-0.4.15/lib/python2.7/site-packages
-- Found Python3Interp: /nix/store/wqx2vx0cxqlmii5h907nkmgpi0p4n7vn-python3-3.6.4/bin/python3.6  
-- Using PYTHON3_SITEPKG_DIR=/nix/store/yygy390ryb93pcf6i6qi5sg3mkib86ar-libproxy-0.4.15/lib/python3.6/site-packages
-- Could NOT find Perl (missing: PERL_EXECUTABLE) 
-- Could NOT find Perl (missing: PERL_EXECUTABLE) 
-- Could NOT find PerlLibs (missing: PERL_LIBRARY PERL_INCLUDE_PATH) 
MODULES TO BUILD:
		config_envvar
		config_sysconfig
		config_gnome
		config_gnome3
	m	config_kde
	*	config_macosx
		config_w32reg
	*	ignore_domain
	*	ignore_hostname
	*	ignore_ip
		network_networkmanager
		pacrunner_mozjs
		pacrunner_natus
	*	pacrunner_webkit
	*	wpad_dns_alias

-- Configuring done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   libproxy

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev):
  Policy CMP0068 is not set: RPATH settings on macOS do not affect
  install_name.  Run "cmake --help-policy CMP0068" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, the install_name fields for
  the following targets are still affected by RPATH settings:

   libproxy

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_INSTALL_INCLUDEDIR
    CMAKE_INSTALL_LIBDIR
    MP_MACOSX
    WITH_WEBKIT


-- Build files have been written to: /private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/build
cmake: enabled parallel building
building
build flags: -j1 -l1 SHELL=/nix/store/hiv85an0qyzj6ps88f5pvkbbdj8238nj-bash-4.4-p12/bin/bash
Scanning dependencies of target modman
[  1%] Building CXX object libmodman/CMakeFiles/modman.dir/module_manager.cpp.o
[  3%] Linking CXX static library libmodman.a
[  3%] Built target modman
Scanning dependencies of target condition_one
[  5%] Building CXX object libmodman/test/CMakeFiles/condition_one.dir/condition_one.cpp.o
[  6%] Linking CXX shared module modules/condition/condition_one.so
[  6%] Built target condition_one
Scanning dependencies of target condition_two
[  8%] Building CXX object libmodman/test/CMakeFiles/condition_two.dir/condition_two.cpp.o
[ 10%] Linking CXX shared module modules/condition/condition_two.so
[ 10%] Built target condition_two
Scanning dependencies of target symbol
[ 12%] Building CXX object libmodman/test/CMakeFiles/symbol.dir/main.cpp.o
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:63:22: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                if (!strstr(typeid(*(exts[i])).name(), argv[i+2])) {
                                   ^
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:66:28: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                                cout << "\t" << typeid(*(exts[j])).name() << endl;
                                                       ^
2 warnings generated.
[ 13%] Linking CXX executable symbol
[ 13%] Built target symbol
Scanning dependencies of target sorted
[ 15%] Building CXX object libmodman/test/CMakeFiles/sorted.dir/main.cpp.o
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:63:22: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                if (!strstr(typeid(*(exts[i])).name(), argv[i+2])) {
                                   ^
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:66:28: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                                cout << "\t" << typeid(*(exts[j])).name() << endl;
                                                       ^
2 warnings generated.
[ 17%] Linking CXX executable sorted
[ 17%] Built target sorted
Scanning dependencies of target singleton
[ 18%] Building CXX object libmodman/test/CMakeFiles/singleton.dir/main.cpp.o
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:63:22: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                if (!strstr(typeid(*(exts[i])).name(), argv[i+2])) {
                                   ^
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:66:28: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                                cout << "\t" << typeid(*(exts[j])).name() << endl;
                                                       ^
2 warnings generated.
[ 20%] Linking CXX executable singleton
[ 20%] Built target singleton
Scanning dependencies of target condition
[ 22%] Building CXX object libmodman/test/CMakeFiles/condition.dir/main.cpp.o
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:63:22: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                if (!strstr(typeid(*(exts[i])).name(), argv[i+2])) {
                                   ^
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:66:28: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                                cout << "\t" << typeid(*(exts[j])).name() << endl;
                                                       ^
2 warnings generated.
[ 24%] Linking CXX executable condition
[ 24%] Built target condition
Scanning dependencies of target symbol_two
[ 25%] Building CXX object libmodman/test/CMakeFiles/symbol_two.dir/symbol_two.cpp.o
[ 27%] Linking CXX shared module modules/symbol/symbol_two.so
[ 27%] Built target symbol_two
Scanning dependencies of target sorted_two
[ 29%] Building CXX object libmodman/test/CMakeFiles/sorted_two.dir/sorted_two.cpp.o
[ 31%] Linking CXX shared module modules/sorted/sorted_two.so
[ 31%] Built target sorted_two
Scanning dependencies of target builtin_one
[ 32%] Building CXX object libmodman/test/CMakeFiles/builtin_one.dir/builtin_one.cpp.o
[ 34%] Linking CXX shared module modules/builtin/builtin_one.so
[ 34%] Built target builtin_one
Scanning dependencies of target builtin
[ 36%] Building CXX object libmodman/test/CMakeFiles/builtin.dir/builtin.cpp.o
[ 37%] Building CXX object libmodman/test/CMakeFiles/builtin.dir/builtin_one.cpp.o
[ 39%] Linking CXX executable builtin
[ 39%] Built target builtin
Scanning dependencies of target symbol_one
[ 41%] Building CXX object libmodman/test/CMakeFiles/symbol_one.dir/symbol_one.cpp.o
[ 43%] Linking CXX shared module modules/symbol/symbol_one.so
[ 43%] Built target symbol_one
Scanning dependencies of target singleton_one
[ 44%] Building CXX object libmodman/test/CMakeFiles/singleton_one.dir/singleton_one.cpp.o
[ 46%] Linking CXX shared module modules/singleton/singleton_one.so
[ 46%] Built target singleton_one
Scanning dependencies of target sorted_one
[ 48%] Building CXX object libmodman/test/CMakeFiles/sorted_one.dir/sorted_one.cpp.o
[ 50%] Linking CXX shared module modules/sorted/sorted_one.so
[ 50%] Built target sorted_one
Scanning dependencies of target symbollnk
[ 51%] Building CXX object libmodman/test/CMakeFiles/symbollnk.dir/main.cpp.o
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:63:22: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                if (!strstr(typeid(*(exts[i])).name(), argv[i+2])) {
                                   ^
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:66:28: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                                cout << "\t" << typeid(*(exts[j])).name() << endl;
                                                       ^
2 warnings generated.
[ 53%] Linking CXX executable symbollnk
[ 53%] Built target symbollnk
Scanning dependencies of target singleton_two
[ 55%] Building CXX object libmodman/test/CMakeFiles/singleton_two.dir/singleton_two.cpp.o
[ 56%] Linking CXX shared module modules/singleton/singleton_two.so
[ 56%] Built target singleton_two
Scanning dependencies of target libproxy
[ 58%] Building CXX object libproxy/CMakeFiles/libproxy.dir/extension_config.cpp.o
[ 60%] Building CXX object libproxy/CMakeFiles/libproxy.dir/extension_pacrunner.cpp.o
[ 62%] Building CXX object libproxy/CMakeFiles/libproxy.dir/extension_wpad.cpp.o
[ 63%] Building CXX object libproxy/CMakeFiles/libproxy.dir/proxy.cpp.o
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libproxy/proxy.cpp:328:54: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                                if (debug) cerr << "WPAD search via: " << typeid(**i).name() << endl;
                                                                                 ^
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libproxy/proxy.cpp:352:57: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                                                        if (debug) cerr << "WPAD search via: " << typeid(**i).name() << endl;
                                                                                                         ^
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libproxy/proxy.cpp:418:52: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                if (debug) cerr << "Using pacrunner: " << typeid(*pacrunners[0]).name() << endl;
                                                                 ^
3 warnings generated.
[ 65%] Building CXX object libproxy/CMakeFiles/libproxy.dir/url.cpp.o
[ 67%] Building CXX object libproxy/CMakeFiles/libproxy.dir/modules/config_macosx.cpp.o
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libproxy/modules/config_macosx.cpp:25:10: fatal error: 'SystemConfiguration/SystemConfiguration.h' file not found
#include <SystemConfiguration/SystemConfiguration.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [libproxy/CMakeFiles/libproxy.dir/build.make:183: libproxy/CMakeFiles/libproxy.dir/modules/config_macosx.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1722: libproxy/CMakeFiles/libproxy.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
builder for ‘/nix/store/blgz1sx70vwlwj3qmapjanl2cjpidm00-libproxy-0.4.15.drv’ failed with exit code 2
error: build of ‘/nix/store/blgz1sx70vwlwj3qmapjanl2cjpidm00-libproxy-0.4.15.drv’ failed

@hamishmack
Copy link
Contributor Author

Adding stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.SystemConfiguration to buildInputs and then it goes looking for JavaScriptCore.h:

$ nix-build ./nixpkgs -A libproxy
these derivations will be built:
  /nix/store/8mqvdr5l2s51ncgjmd5gw7palwpnwq8y-libproxy-0.4.15.drv
building path(s) ‘/nix/store/2a33ms2b7c2lisxpvbgdy8axpfznd7d2-libproxy-0.4.15-dev’, ‘/nix/store/dw1zl6dmyarg1iaxh7xpml79msmh0fvd-libproxy-0.4.15’
unpacking sources
unpacking source archive /nix/store/25m3x30kpc27v6i2mivjjyip03222xj1-source
source root is source
patching sources
configuring
fixing cmake files...
cmake flags: -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/2a33ms2b7c2lisxpvbgdy8axpfznd7d2-libproxy-0.4.15-dev/include -DCMAKE_INSTALL_LIBDIR=/nix/store/dw1zl6dmyarg1iaxh7xpml79msmh0fvd-libproxy-0.4.15/lib -DCMAKE_INSTALL_NAME_DIR=/nix/store/dw1zl6dmyarg1iaxh7xpml79msmh0fvd-libproxy-0.4.15/lib -DCMAKE_INSTALL_PREFIX=/nix/store/dw1zl6dmyarg1iaxh7xpml79msmh0fvd-libproxy-0.4.15 -DMP_MACOSX=OFF -DWITH_WEBKIT=OFF -DWITH_WEBKIT3=OFF -DPYTHON2_SITEPKG_DIR=/nix/store/dw1zl6dmyarg1iaxh7xpml79msmh0fvd-libproxy-0.4.15/lib/python2.7/site-packages -DPYTHON3_SITEPKG_DIR=/nix/store/dw1zl6dmyarg1iaxh7xpml79msmh0fvd-libproxy-0.4.15/lib/python3.6/site-packages
-- The C compiler identification is Clang 4.0.1
-- The CXX compiler identification is Clang 4.0.1
-- Check for working C compiler: /nix/store/61plv8rx9jvjzk8awp7cxv42gy4g41a6-clang-wrapper-4.0.1/bin/clang
-- Check for working C compiler: /nix/store/61plv8rx9jvjzk8awp7cxv42gy4g41a6-clang-wrapper-4.0.1/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /nix/store/61plv8rx9jvjzk8awp7cxv42gy4g41a6-clang-wrapper-4.0.1/bin/clang++
-- Check for working CXX compiler: /nix/store/61plv8rx9jvjzk8awp7cxv42gy4g41a6-clang-wrapper-4.0.1/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building with bundled libmodman
-- Found Python2Interp: /nix/store/wg2wkr5j9xy3wr8r8dqvvj2wgygcvrvl-python-2.7.14/bin/python (found version "2.7.14") 
-- Using PYTHON2_SITEPKG_DIR=/nix/store/dw1zl6dmyarg1iaxh7xpml79msmh0fvd-libproxy-0.4.15/lib/python2.7/site-packages
-- Found Python3Interp: /nix/store/wqx2vx0cxqlmii5h907nkmgpi0p4n7vn-python3-3.6.4/bin/python3.6  
-- Using PYTHON3_SITEPKG_DIR=/nix/store/dw1zl6dmyarg1iaxh7xpml79msmh0fvd-libproxy-0.4.15/lib/python3.6/site-packages
-- Could NOT find Perl (missing: PERL_EXECUTABLE) 
-- Could NOT find Perl (missing: PERL_EXECUTABLE) 
-- Could NOT find PerlLibs (missing: PERL_LIBRARY PERL_INCLUDE_PATH) 
MODULES TO BUILD:
		config_envvar
		config_sysconfig
		config_gnome
		config_gnome3
	m	config_kde
	*	config_macosx
		config_w32reg
	*	ignore_domain
	*	ignore_hostname
	*	ignore_ip
		network_networkmanager
		pacrunner_mozjs
		pacrunner_natus
	*	pacrunner_webkit
	*	wpad_dns_alias

-- Configuring done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   libproxy

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev):
  Policy CMP0068 is not set: RPATH settings on macOS do not affect
  install_name.  Run "cmake --help-policy CMP0068" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, the install_name fields for
  the following targets are still affected by RPATH settings:

   libproxy

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_INSTALL_INCLUDEDIR
    CMAKE_INSTALL_LIBDIR
    MP_MACOSX
    WITH_WEBKIT


-- Build files have been written to: /private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/build
cmake: enabled parallel building
building
build flags: -j1 -l1 SHELL=/nix/store/hiv85an0qyzj6ps88f5pvkbbdj8238nj-bash-4.4-p12/bin/bash
Scanning dependencies of target modman
[  1%] Building CXX object libmodman/CMakeFiles/modman.dir/module_manager.cpp.o
[  3%] Linking CXX static library libmodman.a
[  3%] Built target modman
Scanning dependencies of target condition_one
[  5%] Building CXX object libmodman/test/CMakeFiles/condition_one.dir/condition_one.cpp.o
[  6%] Linking CXX shared module modules/condition/condition_one.so
[  6%] Built target condition_one
Scanning dependencies of target condition_two
[  8%] Building CXX object libmodman/test/CMakeFiles/condition_two.dir/condition_two.cpp.o
[ 10%] Linking CXX shared module modules/condition/condition_two.so
[ 10%] Built target condition_two
Scanning dependencies of target symbol
[ 12%] Building CXX object libmodman/test/CMakeFiles/symbol.dir/main.cpp.o
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:63:22: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                if (!strstr(typeid(*(exts[i])).name(), argv[i+2])) {
                                   ^
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:66:28: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                                cout << "\t" << typeid(*(exts[j])).name() << endl;
                                                       ^
2 warnings generated.
[ 13%] Linking CXX executable symbol
[ 13%] Built target symbol
Scanning dependencies of target sorted
[ 15%] Building CXX object libmodman/test/CMakeFiles/sorted.dir/main.cpp.o
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:63:22: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                if (!strstr(typeid(*(exts[i])).name(), argv[i+2])) {
                                   ^
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:66:28: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                                cout << "\t" << typeid(*(exts[j])).name() << endl;
                                                       ^
2 warnings generated.
[ 17%] Linking CXX executable sorted
[ 17%] Built target sorted
Scanning dependencies of target singleton
[ 18%] Building CXX object libmodman/test/CMakeFiles/singleton.dir/main.cpp.o
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:63:22: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                if (!strstr(typeid(*(exts[i])).name(), argv[i+2])) {
                                   ^
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:66:28: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                                cout << "\t" << typeid(*(exts[j])).name() << endl;
                                                       ^
2 warnings generated.
[ 20%] Linking CXX executable singleton
[ 20%] Built target singleton
Scanning dependencies of target condition
[ 22%] Building CXX object libmodman/test/CMakeFiles/condition.dir/main.cpp.o
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:63:22: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                if (!strstr(typeid(*(exts[i])).name(), argv[i+2])) {
                                   ^
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:66:28: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                                cout << "\t" << typeid(*(exts[j])).name() << endl;
                                                       ^
2 warnings generated.
[ 24%] Linking CXX executable condition
[ 24%] Built target condition
Scanning dependencies of target symbol_two
[ 25%] Building CXX object libmodman/test/CMakeFiles/symbol_two.dir/symbol_two.cpp.o
[ 27%] Linking CXX shared module modules/symbol/symbol_two.so
[ 27%] Built target symbol_two
Scanning dependencies of target sorted_two
[ 29%] Building CXX object libmodman/test/CMakeFiles/sorted_two.dir/sorted_two.cpp.o
[ 31%] Linking CXX shared module modules/sorted/sorted_two.so
[ 31%] Built target sorted_two
Scanning dependencies of target builtin_one
[ 32%] Building CXX object libmodman/test/CMakeFiles/builtin_one.dir/builtin_one.cpp.o
[ 34%] Linking CXX shared module modules/builtin/builtin_one.so
[ 34%] Built target builtin_one
Scanning dependencies of target builtin
[ 36%] Building CXX object libmodman/test/CMakeFiles/builtin.dir/builtin.cpp.o
[ 37%] Building CXX object libmodman/test/CMakeFiles/builtin.dir/builtin_one.cpp.o
[ 39%] Linking CXX executable builtin
[ 39%] Built target builtin
Scanning dependencies of target symbol_one
[ 41%] Building CXX object libmodman/test/CMakeFiles/symbol_one.dir/symbol_one.cpp.o
[ 43%] Linking CXX shared module modules/symbol/symbol_one.so
[ 43%] Built target symbol_one
Scanning dependencies of target singleton_one
[ 44%] Building CXX object libmodman/test/CMakeFiles/singleton_one.dir/singleton_one.cpp.o
[ 46%] Linking CXX shared module modules/singleton/singleton_one.so
[ 46%] Built target singleton_one
Scanning dependencies of target sorted_one
[ 48%] Building CXX object libmodman/test/CMakeFiles/sorted_one.dir/sorted_one.cpp.o
[ 50%] Linking CXX shared module modules/sorted/sorted_one.so
[ 50%] Built target sorted_one
Scanning dependencies of target symbollnk
[ 51%] Building CXX object libmodman/test/CMakeFiles/symbollnk.dir/main.cpp.o
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:63:22: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                if (!strstr(typeid(*(exts[i])).name(), argv[i+2])) {
                                   ^
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libmodman/test/main.cpp:66:28: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                                cout << "\t" << typeid(*(exts[j])).name() << endl;
                                                       ^
2 warnings generated.
[ 53%] Linking CXX executable symbollnk
[ 53%] Built target symbollnk
Scanning dependencies of target singleton_two
[ 55%] Building CXX object libmodman/test/CMakeFiles/singleton_two.dir/singleton_two.cpp.o
[ 56%] Linking CXX shared module modules/singleton/singleton_two.so
[ 56%] Built target singleton_two
Scanning dependencies of target libproxy
[ 58%] Building CXX object libproxy/CMakeFiles/libproxy.dir/extension_config.cpp.o
[ 60%] Building CXX object libproxy/CMakeFiles/libproxy.dir/extension_pacrunner.cpp.o
[ 62%] Building CXX object libproxy/CMakeFiles/libproxy.dir/extension_wpad.cpp.o
[ 63%] Building CXX object libproxy/CMakeFiles/libproxy.dir/proxy.cpp.o
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libproxy/proxy.cpp:328:54: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                                if (debug) cerr << "WPAD search via: " << typeid(**i).name() << endl;
                                                                                 ^
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libproxy/proxy.cpp:352:57: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                                                        if (debug) cerr << "WPAD search via: " << typeid(**i).name() << endl;
                                                                                                         ^
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libproxy/proxy.cpp:418:52: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                if (debug) cerr << "Using pacrunner: " << typeid(*pacrunners[0]).name() << endl;
                                                                 ^
3 warnings generated.
[ 65%] Building CXX object libproxy/CMakeFiles/libproxy.dir/url.cpp.o
[ 67%] Building CXX object libproxy/CMakeFiles/libproxy.dir/modules/config_macosx.cpp.o
[ 68%] Building CXX object libproxy/CMakeFiles/libproxy.dir/modules/ignore_domain.cpp.o
[ 70%] Building CXX object libproxy/CMakeFiles/libproxy.dir/modules/ignore_hostname.cpp.o
[ 72%] Building CXX object libproxy/CMakeFiles/libproxy.dir/modules/ignore_ip.cpp.o
[ 74%] Building CXX object libproxy/CMakeFiles/libproxy.dir/modules/pacrunner_webkit.cpp.o
/private/var/folders/fg/y5gns8p14ggc90xrdwy30d2h0000gn/T/nix-build-libproxy-0.4.15.drv-0/source/libproxy/modules/pacrunner_webkit.cpp:27:10: fatal error: 'JavaScriptCore/JavaScriptCore.h' file not found
#include <JavaScriptCore/JavaScriptCore.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [libproxy/CMakeFiles/libproxy.dir/build.make:279: libproxy/CMakeFiles/libproxy.dir/modules/pacrunner_webkit.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1722: libproxy/CMakeFiles/libproxy.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
builder for ‘/nix/store/8mqvdr5l2s51ncgjmd5gw7palwpnwq8y-libproxy-0.4.15.drv’ failed with exit code 2

@jtojnar
Copy link
Contributor

jtojnar commented Jan 6, 2018

Only thing that comes to mind is the Webkit coming from somewhere else. Let’s try pushing it without the patch and sic @GrahamcOfBorg on it.

@hamishmack
Copy link
Contributor Author

Pushed. I am also trying out a local build with

     darwin.apple_sdk.frameworks.SystemConfiguration
     darwin.apple_sdk.frameworks.JavaScriptCore

in the buildInputs this seems to build libproxy ok (including the pacrunner-webkit module). I am checking to see if webkitgtk fails with duplicate symbols or something.

@jtojnar
Copy link
Contributor

jtojnar commented Jan 6, 2018

@GrahamcOfBorg build libproxy

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failure for system: x86_64-darwin

[ 67%] Building CXX object libproxy/CMakeFiles/libproxy.dir/modules/config_macosx.cpp.o
/tmp/nix-build-libproxy-0.4.15.drv-0/source/libproxy/modules/config_macosx.cpp:25:10: fatal error: 'SystemConfiguration/SystemConfiguration.h' file not found
#include <SystemConfiguration/SystemConfiguration.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [libproxy/CMakeFiles/libproxy.dir/build.make:183: libproxy/CMakeFiles/libproxy.dir/modules/config_macosx.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1722: libproxy/CMakeFiles/libproxy.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
builder for ‘/nix/store/3absac5kfz7aa82zw1bjiznqh29h5wvf-libproxy-0.4.15.drv’ failed with exit code 2
error: build of ‘/nix/store/3absac5kfz7aa82zw1bjiznqh29h5wvf-libproxy-0.4.15.drv’ failed

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success for system: x86_64-linux

strip is /nix/store/wxn5gn8amxm1w0ikcx4gbs8a17wvss4j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/akaisi61dvkzb77lkx3sx0cacnmgla50-libproxy-0.4.15/lib  /nix/store/akaisi61dvkzb77lkx3sx0cacnmgla50-libproxy-0.4.15/libexec  /nix/store/akaisi61dvkzb77lkx3sx0cacnmgla50-libproxy-0.4.15/bin 
patching script interpreter paths in /nix/store/akaisi61dvkzb77lkx3sx0cacnmgla50-libproxy-0.4.15
checking for references to /tmp/nix-build-libproxy-0.4.15.drv-0 in /nix/store/akaisi61dvkzb77lkx3sx0cacnmgla50-libproxy-0.4.15...
shrinking RPATHs of ELF executables and libraries in /nix/store/cy1cfksbs9rsz0p0xs7hj618qvjgizpd-libproxy-0.4.15-dev
strip is /nix/store/wxn5gn8amxm1w0ikcx4gbs8a17wvss4j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/cy1cfksbs9rsz0p0xs7hj618qvjgizpd-libproxy-0.4.15-dev/lib 
patching script interpreter paths in /nix/store/cy1cfksbs9rsz0p0xs7hj618qvjgizpd-libproxy-0.4.15-dev
checking for references to /tmp/nix-build-libproxy-0.4.15.drv-0 in /nix/store/cy1cfksbs9rsz0p0xs7hj618qvjgizpd-libproxy-0.4.15-dev...
/nix/store/akaisi61dvkzb77lkx3sx0cacnmgla50-libproxy-0.4.15

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success for system: aarch64-linux

strip is /nix/store/c6qj0j45xizkrx58i65j75a5ysmqhgrs-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/mybb7lkinn9p53diviaccrdgfmfk5nys-libproxy-0.4.15/lib  /nix/store/mybb7lkinn9p53diviaccrdgfmfk5nys-libproxy-0.4.15/libexec  /nix/store/mybb7lkinn9p53diviaccrdgfmfk5nys-libproxy-0.4.15/bin
patching script interpreter paths in /nix/store/mybb7lkinn9p53diviaccrdgfmfk5nys-libproxy-0.4.15
checking for references to /build in /nix/store/mybb7lkinn9p53diviaccrdgfmfk5nys-libproxy-0.4.15...
shrinking RPATHs of ELF executables and libraries in /nix/store/y71aahgknfzycn7lxzcy6i0yrzszqydn-libproxy-0.4.15-dev
strip is /nix/store/c6qj0j45xizkrx58i65j75a5ysmqhgrs-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/y71aahgknfzycn7lxzcy6i0yrzszqydn-libproxy-0.4.15-dev/lib
patching script interpreter paths in /nix/store/y71aahgknfzycn7lxzcy6i0yrzszqydn-libproxy-0.4.15-dev
checking for references to /build in /nix/store/y71aahgknfzycn7lxzcy6i0yrzszqydn-libproxy-0.4.15-dev...
/nix/store/mybb7lkinn9p53diviaccrdgfmfk5nys-libproxy-0.4.15

@jtojnar
Copy link
Contributor

jtojnar commented Jan 6, 2018

@GrahamcOfBorg build libproxy

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success for system: aarch64-linux

/nix/store/mybb7lkinn9p53diviaccrdgfmfk5nys-libproxy-0.4.15

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failure for system: x86_64-darwin

[ 74%] Building CXX object libproxy/CMakeFiles/libproxy.dir/modules/pacrunner_webkit.cpp.o
/tmp/nix-build-libproxy-0.4.15.drv-0/source/libproxy/modules/pacrunner_webkit.cpp:27:10: fatal error: 'JavaScriptCore/JavaScriptCore.h' file not found
#include <JavaScriptCore/JavaScriptCore.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [libproxy/CMakeFiles/libproxy.dir/build.make:279: libproxy/CMakeFiles/libproxy.dir/modules/pacrunner_webkit.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1722: libproxy/CMakeFiles/libproxy.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
builder for ‘/nix/store/mcpqha9yab78ynw5pgzq8x92w3jvmmd5-libproxy-0.4.15.drv’ failed with exit code 2
error: build of ‘/nix/store/mcpqha9yab78ynw5pgzq8x92w3jvmmd5-libproxy-0.4.15.drv’ failed

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success for system: x86_64-linux

strip is /nix/store/wxn5gn8amxm1w0ikcx4gbs8a17wvss4j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/akaisi61dvkzb77lkx3sx0cacnmgla50-libproxy-0.4.15/lib  /nix/store/akaisi61dvkzb77lkx3sx0cacnmgla50-libproxy-0.4.15/libexec  /nix/store/akaisi61dvkzb77lkx3sx0cacnmgla50-libproxy-0.4.15/bin 
patching script interpreter paths in /nix/store/akaisi61dvkzb77lkx3sx0cacnmgla50-libproxy-0.4.15
checking for references to /tmp/nix-build-libproxy-0.4.15.drv-0 in /nix/store/akaisi61dvkzb77lkx3sx0cacnmgla50-libproxy-0.4.15...
shrinking RPATHs of ELF executables and libraries in /nix/store/cy1cfksbs9rsz0p0xs7hj618qvjgizpd-libproxy-0.4.15-dev
strip is /nix/store/wxn5gn8amxm1w0ikcx4gbs8a17wvss4j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/cy1cfksbs9rsz0p0xs7hj618qvjgizpd-libproxy-0.4.15-dev/lib 
patching script interpreter paths in /nix/store/cy1cfksbs9rsz0p0xs7hj618qvjgizpd-libproxy-0.4.15-dev
checking for references to /tmp/nix-build-libproxy-0.4.15.drv-0 in /nix/store/cy1cfksbs9rsz0p0xs7hj618qvjgizpd-libproxy-0.4.15-dev...
/nix/store/akaisi61dvkzb77lkx3sx0cacnmgla50-libproxy-0.4.15

@hamishmack hamishmack force-pushed the glib-networking-macos branch 2 times, most recently from c837994 to 35b706f Compare January 7, 2018 13:19
@hamishmack
Copy link
Contributor Author

hamishmack commented Jan 7, 2018

@jtojnar I used the patch you suggested on IRC (with a small change to prevent it trying and failing on the line px_check_module(WEBKIT webkit-1.0) when WITH_WEBKIT is off).

cmakeFlags = lib.optional stdenv.isLinux "-DWITH_MOZJS=ON"
++ lib.optionals stdenv.isDarwin [
"-DWITH_WEBKIT=OFF"
"-DWITH_WEBKIT3=OFF"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not used with this patch, is it?

@@ -12,22 +12,34 @@ stdenv.mkDerivation rec {
sha256 = "10swd3x576pinx33iwsbd4h15fbh2snmfxzcmab4c56nb08qlbrs";
};

patches = [ ./files/apple-webkit-disable.patch ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just put it next to default.nix there probably will not be many patches. Ideally we would open a pull request against libproxy and just fetchpatched it.

@hamishmack
Copy link
Contributor Author

See libproxy/libproxy#76

@jtojnar jtojnar added this to In Progress in GNOME Feb 1, 2018
@jtojnar
Copy link
Contributor

jtojnar commented Feb 13, 2018

@hamishmack Apparently, #34765 got merged, which uses to Apple’s WebKit on Darwin. Maybe we can go with it for now and if fix it later, if the two WebKit libraries clash.

@hamishmack
Copy link
Contributor Author

@jtojnar, sounds good. I have pushed an update so this PR now just adds the -lintl for macOS builds. This seems to be all we need now to build glib-networking.

@jtojnar
Copy link
Contributor

jtojnar commented Feb 24, 2018

@GrahamcOfBorg build glib_networking

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Partial log (click to expand)

make[3]: Leaving directory '/private/tmp/nix-build-glib-networking-2.54.1.drv-0/glib-networking-2.54.1'
make[2]: Leaving directory '/private/tmp/nix-build-glib-networking-2.54.1.drv-0/glib-networking-2.54.1'
make[1]: Leaving directory '/private/tmp/nix-build-glib-networking-2.54.1.drv-0/glib-networking-2.54.1'
glibPreFixupPhase
post-installation fixup
strip is /nix/store/4sdh09gmvl15cy0zb6i7mbvxh5syz206-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/1bspvgi1av88vclq6sdjb44s08jrks20-glib-networking-2.54.1/lib  /nix/store/1bspvgi1av88vclq6sdjb44s08jrks20-glib-networking-2.54.1/libexec
patching script interpreter paths in /nix/store/1bspvgi1av88vclq6sdjb44s08jrks20-glib-networking-2.54.1
strip is /nix/store/4sdh09gmvl15cy0zb6i7mbvxh5syz206-cctools-binutils-darwin/bin/strip
/nix/store/1bspvgi1av88vclq6sdjb44s08jrks20-glib-networking-2.54.1

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

shrinking /nix/store/jvjfij2hsq7q7g9n1la7rf3031s2s81a-glib-networking-2.54.1/lib/gio/modules/libgiognutls.so
shrinking /nix/store/jvjfij2hsq7q7g9n1la7rf3031s2s81a-glib-networking-2.54.1/lib/gio/modules/libgiognomeproxy.so
shrinking /nix/store/jvjfij2hsq7q7g9n1la7rf3031s2s81a-glib-networking-2.54.1/lib/gio/modules/libgiolibproxy.so
shrinking /nix/store/jvjfij2hsq7q7g9n1la7rf3031s2s81a-glib-networking-2.54.1/libexec/glib-pacrunner
strip is /nix/store/lvx1acn1ig1j2km8jds5x3ggh3f2wa8v-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/jvjfij2hsq7q7g9n1la7rf3031s2s81a-glib-networking-2.54.1/lib  /nix/store/jvjfij2hsq7q7g9n1la7rf3031s2s81a-glib-networking-2.54.1/libexec
patching script interpreter paths in /nix/store/jvjfij2hsq7q7g9n1la7rf3031s2s81a-glib-networking-2.54.1
checking for references to /build in /nix/store/jvjfij2hsq7q7g9n1la7rf3031s2s81a-glib-networking-2.54.1...
strip is /nix/store/lvx1acn1ig1j2km8jds5x3ggh3f2wa8v-binutils-2.28.1/bin/strip
/nix/store/jvjfij2hsq7q7g9n1la7rf3031s2s81a-glib-networking-2.54.1

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

shrinking /nix/store/6lkpvfn8n6hvbkh8cvn7xkrv68kn49a4-glib-networking-2.54.1/libexec/glib-pacrunner
shrinking /nix/store/6lkpvfn8n6hvbkh8cvn7xkrv68kn49a4-glib-networking-2.54.1/lib/gio/modules/libgiognomeproxy.so
shrinking /nix/store/6lkpvfn8n6hvbkh8cvn7xkrv68kn49a4-glib-networking-2.54.1/lib/gio/modules/libgiognutls.so
shrinking /nix/store/6lkpvfn8n6hvbkh8cvn7xkrv68kn49a4-glib-networking-2.54.1/lib/gio/modules/libgiolibproxy.so
strip is /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/6lkpvfn8n6hvbkh8cvn7xkrv68kn49a4-glib-networking-2.54.1/lib  /nix/store/6lkpvfn8n6hvbkh8cvn7xkrv68kn49a4-glib-networking-2.54.1/libexec 
patching script interpreter paths in /nix/store/6lkpvfn8n6hvbkh8cvn7xkrv68kn49a4-glib-networking-2.54.1
checking for references to /tmp/nix-build-glib-networking-2.54.1.drv-0 in /nix/store/6lkpvfn8n6hvbkh8cvn7xkrv68kn49a4-glib-networking-2.54.1...
strip is /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1/bin/strip
/nix/store/6lkpvfn8n6hvbkh8cvn7xkrv68kn49a4-glib-networking-2.54.1

@jtojnar jtojnar merged commit c8b1b34 into NixOS:master Feb 24, 2018
GNOME automation moved this from In Progress to Done Feb 24, 2018
@jtojnar
Copy link
Contributor

jtojnar commented Feb 24, 2018

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
GNOME
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants