Coder Social home page Coder Social logo

Comments (14)

BenWibking avatar BenWibking commented on May 28, 2024 1

On macOS, /tmp has always been a symlink to /private/tmp (see: https://apple.stackexchange.com/questions/1043/why-is-tmp-a-symlink-to-private-tmp). So I think this has to be changed for this package to build on macOS.

from spack.

wdconinc avatar wdconinc commented on May 28, 2024

Is your /tmp/ stage dir intentionally a symlink? Is this a homebrew setup? We could pass the flag to bypass this check if this is not your choice but unavoidable and we can check it in the package.py. More info in the source at https://github.com/qt/qtbase/blob/dev/CMakeLists.txt#L40-L61

from spack.

wdconinc avatar wdconinc commented on May 28, 2024

If you were merely using a symlink to get your stage dir to point to a larger volume than the default, then you can also use settings in config.yaml for this. E.g. I have

$ cat ~/.spack/config.yaml 
config:
  ccache: true
  concretizer: clingo
  install_tree:
    root: /opt/software
  build_stage:
    - /data/spack/stage
  source_cache: /data/spack/cache

from spack.

wdconinc avatar wdconinc commented on May 28, 2024

So, I assume a pre-6.6 can't be installed at all on macOS when your stage dir is under /tmp because then the QT_ALLOW_SYMLINK_IN_PATHS flag isn't yet available (qt/qtbase@edabd36). That will be an interesting thing to stick into a conflict...

from spack.

wdconinc avatar wdconinc commented on May 28, 2024

Does setting config: build_stage: /private/tmp work? If so, I would think that's the preferred solution.

from spack.

wdconinc avatar wdconinc commented on May 28, 2024

If that works, we can add a warning, like this:

diff --git a/var/spack/repos/builtin/packages/qt-base/package.py b/var/spack/repos/builtin/packages/qt-base/package.py
index d0bda5fd9c..c6109dd6f8 100644
--- a/var/spack/repos/builtin/packages/qt-base/package.py
+++ b/var/spack/repos/builtin/packages/qt-base/package.py
@@ -67,6 +67,14 @@ def cmake_args(self):
         # Now append all qt-* dependency prefixex into a prefix path
         args.append(self.define("QT_ADDITIONAL_PACKAGES_PREFIX_PATH", ":".join(qt_prefix_path)))
 
+        # On macOS pass a flag to allow symlinks in stage dir
+        if sys.platform == "darwin" and self.stage.source_path.startswith("/tmp"):
+            raise InstallError(
+                "\n\nQt6 cannot build when your build stage path contains symbolic links.\n"
+                + "On macOS, this is the case for /tmp, which points to /private/tmp.\n"
+                + "Modify your config to use 'config: build_stage: /private/tmp' instead."
+            )
+
         return args
 
     @run_after("install")

from spack.

BenWibking avatar BenWibking commented on May 28, 2024

I tried setting:

$ cat .spack/config.yaml
config:
    build_stage:
      - /private/tmp/$user/spack-stage

But I still get the same error:

==> Installing qt-base-6.6.1-vazg2kxnwkho4nwt2snyh2f6bi22jua2 [40/40]
==> No binary for qt-base-6.6.1-vazg2kxnwkho4nwt2snyh2f6bi22jua2 found: installing from source
==> Fetching https://github.com/qt/qtbase/archive/refs/tags/v6.6.1.tar.gz
==> No patches needed for qt-base
==> qt-base: Executing phase: 'cmake'
==> Error: ProcessError: Command exited with status 1:
    '/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/cmake-3.27.8-5jx4kantkoym2tvqtbj3dfeupvghzssj/bin/cmake' '-G' 'Ninja' '-DCMAKE_INSTALL_PREFIX:STRING=/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/qt-base-6.6.1-vazg2kxnwkho4nwt2snyh2f6bi22jua2' '-DCMAKE_BUILD_TYPE:STRING=Release' '-DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=OFF' '-DCMAKE_FIND_FRAMEWORK:STRING=LAST' '-DCMAKE_FIND_APPBUNDLE:STRING=LAST' '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON' '-DCMAKE_INSTALL_RPATH:STRING=/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/qt-base-6.6.1-vazg2kxnwkho4nwt2snyh2f6bi22jua2/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/qt-base-6.6.1-vazg2kxnwkho4nwt2snyh2f6bi22jua2/lib64;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/double-conversion-3.3.0-outqtojaawb4npl77sy67d5q72eewgyf/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/fontconfig-2.14.2-ob2f2j7aqo2sxxouqu6pubgl3rnl723h/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/font-util-1.4.0-zeheqi5dtpttc4o6bz7653farslwwpfs/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/freetype-2.10.2-auhefdnhxhcregep4c7nlcxiyivbl44s/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/bzip2-1.0.8-ehssmpibt6hrfi2ejx27x5mqh4grarax/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libpng-1.6.39-75jaxjyyph2la67ke2cctlt2vzn5vmrk/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/zlib-ng-2.1.4-i47zbhbevychxcn6k5s3xxloacrzgh25/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libxml2-2.10.3-cymu5ty7dfmwcg4gt2iaplzoq5navncv/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libiconv-1.17-saogvgdzzy23jachvd5w36bjkoq2wsuy/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/xz-5.4.1-ghigt7li2jeuwt3aurwjhbdvqphbmduc/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/harfbuzz-7.3.0-hrkedu5xuuhk5w36fknhp4on5s2hayfa/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/cairo-1.16.0-wccyrqbrolpo5oeay4f2yg2bdorvbsdy/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/glib-2.78.0-26org6ds4syzzkmqek4eisbsc4dhebsf/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/gettext-0.22.4-tgaq3shfsd7ybpza2ysc774d7dp7omu2/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/ncurses-6.4-2hjzhqhz4blbz2r3ij735ju62fnndhmc/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libelf-0.8.13-bannvadwpnrvumazjs2k3nuax6hrcu55/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libffi-3.4.4-46lcsbbmuzh6hbkdge2tlwigbi3uwui4/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/pcre2-10.42-6owgfviqosybzik4w4uw55zbqp3rcqbn/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/pixman-0.42.2-f3cklpvgthcl5xkqwglb5qf6jxvkghly/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/gobject-introspection-1.76.1-g32ruaghc47rdufbujjzzwpfvkyosz43/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/python-3.11.6-v2o3e5lixrf33wpjb6faaiac5gtepjmo/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/expat-2.5.0-hmdysf6hcrzuhcxu7fkecpvskzxecgps/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/gdbm-1.23-amtpuskagocirjhffgqrjas3bfbnzixi/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/readline-8.2-tg55l5ynuh64htn2kcfyblyvrn5ak4py/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libxcrypt-4.4.35-5ovs3r5p73fytvon6q5iv2lkbf3qlftm/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/openssl-3.1.3-dygdgbwb36dacukxuz4y6fnlju5zstmb/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/sqlite-3.43.2-64qxny4hmvpl7gtn222qc5spnl6oi3rq/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/icu4c-67.1-wkfbczebfxxr7gnx34todffxuemvz3pm/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libjpeg-turbo-3.0.0-n4ht2wqlfp2dwl5hzbalfadxad2chdga/lib;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/zstd-1.5.5-faftir4bjtew7obelcy3muo6fz6jiwt7/lib' '-DCMAKE_PREFIX_PATH:STRING=/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libjpeg-turbo-3.0.0-n4ht2wqlfp2dwl5hzbalfadxad2chdga;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/harfbuzz-7.3.0-hrkedu5xuuhk5w36fknhp4on5s2hayfa;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/icu4c-67.1-wkfbczebfxxr7gnx34todffxuemvz3pm;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/gobject-introspection-1.76.1-g32ruaghc47rdufbujjzzwpfvkyosz43;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/cairo-1.16.0-wccyrqbrolpo5oeay4f2yg2bdorvbsdy;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/pixman-0.42.2-f3cklpvgthcl5xkqwglb5qf6jxvkghly;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/glib-2.78.0-26org6ds4syzzkmqek4eisbsc4dhebsf;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/pcre2-10.42-6owgfviqosybzik4w4uw55zbqp3rcqbn;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/ninja-1.11.1-ondzzfag4tmynwlidwdqdaiht4lz6g6p;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libelf-0.8.13-bannvadwpnrvumazjs2k3nuax6hrcu55;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/fontconfig-2.14.2-ob2f2j7aqo2sxxouqu6pubgl3rnl723h;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/python-3.11.6-v2o3e5lixrf33wpjb6faaiac5gtepjmo;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/sqlite-3.43.2-64qxny4hmvpl7gtn222qc5spnl6oi3rq;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/openssl-3.1.3-dygdgbwb36dacukxuz4y6fnlju5zstmb;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libxcrypt-4.4.35-5ovs3r5p73fytvon6q5iv2lkbf3qlftm;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libffi-3.4.4-46lcsbbmuzh6hbkdge2tlwigbi3uwui4;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/gettext-0.22.4-tgaq3shfsd7ybpza2ysc774d7dp7omu2;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/tar-1.34-g6sf3o7rd442hkpei2ppzdt5qd54husr;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/zstd-1.5.5-faftir4bjtew7obelcy3muo6fz6jiwt7;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/expat-2.5.0-hmdysf6hcrzuhcxu7fkecpvskzxecgps;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libxml2-2.10.3-cymu5ty7dfmwcg4gt2iaplzoq5navncv;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/xz-5.4.1-ghigt7li2jeuwt3aurwjhbdvqphbmduc;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/font-util-1.4.0-zeheqi5dtpttc4o6bz7653farslwwpfs;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/freetype-2.10.2-auhefdnhxhcregep4c7nlcxiyivbl44s;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libpng-1.6.39-75jaxjyyph2la67ke2cctlt2vzn5vmrk;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/gdbm-1.23-amtpuskagocirjhffgqrjas3bfbnzixi;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/readline-8.2-tg55l5ynuh64htn2kcfyblyvrn5ak4py;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/bzip2-1.0.8-ehssmpibt6hrfi2ejx27x5mqh4grarax;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libiconv-1.17-saogvgdzzy23jachvd5w36bjkoq2wsuy;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/double-conversion-3.3.0-outqtojaawb4npl77sy67d5q72eewgyf;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/cmake-3.27.8-5jx4kantkoym2tvqtbj3dfeupvghzssj;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/ncurses-6.4-2hjzhqhz4blbz2r3ij735ju62fnndhmc;/Users/benwibking/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/zlib-ng-2.1.4-i47zbhbevychxcn6k5s3xxloacrzgh25;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' '-DQT_ADDITIONAL_PACKAGES_PREFIX_PATH:STRING=' '-DBUILD_SHARED_LIBS:BOOL=ON' '-DFEATURE_optimize_size:BOOL=OFF' '-DFEATURE_accessibility:BOOL=OFF' '-DFEATURE_dbus:BOOL=OFF' '-DFEATURE_framework:BOOL=ON' '-DFEATURE_gui:BOOL=ON' '-DFEATURE_network:BOOL=OFF' '-DFEATURE_widgets:BOOL=ON' '-DFEATURE_sql:BOOL=ON' '-DINPUT_opengl:STRING=no' '-DINPUT_doubleconversion:STRING=system' '-DINPUT_sqlite:STRING=system' '-DFEATURE_system_doubleconversion:BOOL=ON' '-DFEATURE_system_pcre2:BOOL=ON' '-DFEATURE_system_zlib:BOOL=ON' '-DFEATURE_system_libb2:BOOL=OFF' '-DFEATURE_system_jpeg:BOOL=ON' '-DFEATURE_system_png:BOOL=ON' '-DFEATURE_system_sqlite:BOOL=ON' '-DFEATURE_system_freetype:BOOL=ON' '-DFEATURE_system_harfbuzz:BOOL=ON' '-DFEATURE_system_textmarkdownreader:BOOL=OFF' '-DFEATURE_system_xcb_xinput:BOOL=ON' '/private/tmp/benwibking/spack-stage/spack-stage-qt-base-6.6.1-vazg2kxnwkho4nwt2snyh2f6bi22jua2/spack-src'

1 error found in build log:
  >> 3    CMake Error at CMakeLists.txt:56 (message):
     4      The path
     5      "/tmp/benwibking/spack-stage/spack-stage-qt-base-6.6.1-vazg2kxnwkho4nwt2snyh2f6bi22jua2/spack-build-vazg2kx"
     6      contains symlinks.  This is not supported.  Possible solutions:
     7
     8          - Map directories using a transparent mechanism such as mount --bind
     9          - Pass the real path of the build directory to CMake, e.g. using

See build log for details:
  /private/tmp/benwibking/spack-stage/spack-stage-qt-base-6.6.1-vazg2kxnwkho4nwt2snyh2f6bi22jua2/spack-build-out.txt

from spack.

wdconinc avatar wdconinc commented on May 28, 2024

Can you try again after a spack clean --stage? I wonder if it just tries to reuse the build stage that is already there and it picks up the CMake cached variables.

from spack.

BenWibking avatar BenWibking commented on May 28, 2024

Can you try again after a spack clean --stage? I wonder if it just tries to reuse the build stage that is already there and it picks up the CMake cached variables.

I tried that, but it appears to have no effect.

from spack.

wdconinc avatar wdconinc commented on May 28, 2024

I'm just confused it still has some reference to /tmp but also clearly did pick up the new stage path...

from spack.

BenWibking avatar BenWibking commented on May 28, 2024

I'm just as confused...

from spack.

BenWibking avatar BenWibking commented on May 28, 2024

I also get this error from a fresh Spack installation. So I think this path has to (somehow) be coming from elsewhere.

from spack.

wdconinc avatar wdconinc commented on May 28, 2024

Did you have any more insights here? I'm a bit hampered by the fact that I don't have a mac where I could try to reproduce this...

from spack.

BenWibking avatar BenWibking commented on May 28, 2024

I haven't had a chance to investigate this further. Why does Qt6 have this restriction on not allowing symlinks in the build path?

from spack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.