Comments (11)
I patch configure to point most of the paths to /usr/local/
, which should have all the Qt 4 files symlinked into them. This is necessary to allow qmake and cmake to find WebKit, since WebKit isn't installed in the same Cellar folder as Qt any more.
Is the only issue that _PLUGINS
, _IMPORTS
, _DATA
, and _TRANSLATIONS
should be changed?
from homebrew-qt4.
Also, do you have a public project/CMakeLists.txt file I could use to reproduce the issue? The file I was using to test stuff cmake
s and builds fine on my machine.
from homebrew-qt4.
The problem seems to be with hardwired paths in the Qt4 formula.
from homebrew-qt4.
@bblacey Sorry, I'm not clear on which of the paths are currently wrong. All of them? Just the /usr/local/Cellar/
paths? Or all the paths except for the /usr/local/Cellar/
paths?
from homebrew-qt4.
Right now, the configure patching sets some of the paths to non-existant paths. At a minimum, they should point to valid paths that exist but ideally paths that work for keg-only installs. The two obvious paths are:
QT_INSTALL_PLUGINS:/usr/local/lib/qt4/plugins
QT_INSTALL_IMPORTS:/usr/local/lib/qt4/imports
Plugins should be /usr/local/Cellar/qt@4/4.8.7/plugins
or /usr/local/opt/qt@4/plugins
and imports should be /usr/local/Cellar/qt@4/4.8.7/imports
or /usr/local/opt/qt@4/translations
.
from homebrew-qt4.
@cartr - what happens if you don't patch those two paths? Will configure set them properly?
from homebrew-qt4.
@cartr - I also noticed that configure allows you to specify these paths as arguments to configure that seems a bit cleaner than using inreplace
. You can see these options using ./configure --help
.
You may use these to separate different parts of the install:
-bindir <dir> ......... Executables will be installed to <dir>
(default PREFIX/bin)
-libdir <dir> ......... Libraries will be installed to <dir>
(default PREFIX/lib)
-docdir <dir> ......... Documentation will be installed to <dir>
(default PREFIX/doc)
-headerdir <dir> ...... Headers will be installed to <dir>
(default PREFIX/include)
-plugindir <dir> ...... Plugins will be installed to <dir>
(default PREFIX/plugins)
-importdir <dir> ...... Imports for QML will be installed to <dir>
(default PREFIX/imports)
-datadir <dir> ........ Data used by Qt programs will be installed to <dir>
(default PREFIX)
-translationdir <dir> . Translations of Qt programs will be installed to <dir>
(default PREFIX/translations)
-sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
(default PREFIX/etc/settings)
-examplesdir <dir> .... Examples will be installed to <dir>
(default PREFIX/examples)
-demosdir <dir> ....... Demos will be installed to <dir>
(default PREFIX/demos)
from homebrew-qt4.
@bblacey If we don't patch these paths, the ./configure
script will set them to /usr/local/Cellar/qt@4/4.8.7/[plugins, imports, bin, etc.]
. For most of the paths, this is incorrect and we need to change them to /usr/local/[bin, lib, etc.]
-- otherwise, build scripts won't find WebKit. But I think you're right that the Plugins and Imports paths are set incorrectly. In your opinion, would it be better to set them to /usr/local/Cellar/qt@4/4.8.7/[plugins, imports]
or /usr/local/opt/qt@4/[plugins, imports]
?
Also, the issue with using those ./configure
flags is that the path we want Qt to install to (/usr/local/Cellar/qt@4/4.8.7/
) and the path we want it to claim it's installed to when someone asks (/usr/local/
) are different. So we need to patch ./configure
to make qmake report the second path while being installed to the first.
from homebrew-qt4.
@cartr - either will work but given that the other paths point to the formula's prefix
(i.e. /usr/local/Cellar/qt@4/4.8.7
), I would probably use the same prefix for the plugins and translations.
from homebrew-qt4.
I "think" that if just remove the inreplace
for those two paths, I think they might be set to the cellar prefix.
from homebrew-qt4.
@bblacey I just submitted a Pull Request that fixes this by going the other way: rather than removing the inreplace
commands to change the path reported by qmake
, it updates the configure arguments to install the plugins and imports in the places qmake
currently reports.
I think this solution will be a bit better because it ensures that build scripts receive the same paths even when qt@4
's version number changes. It also encourages people to install their plugins into /usr/local/lib/qt4 rather than qt@4
's Cellar path which is changed every time the formula updates.
from homebrew-qt4.
Related Issues (20)
- "unrecognized #pragma" with Q_OBJECT on ICC HOT 2
- Location of qt4 source code has changed
- Qt@4 doesn't build on macOS 10.14 HOT 2
- installing lQTGui HOT 6
- MacOS.prefer_64_bit? has been deprecated in Homebrew so the formula now fails to install HOT 1
- can't build [email protected] with docs on mojave HOT 3
- qt@4 bottle broken since openssl 1.0 was removed from homebrew-core HOT 12
- brew tap-pin cartr/qt4 failed HOT 4
- Can't build pyqt@4 (ElCapitan) HOT 5
- bintray is going away. Distribute bottles through github or another service? HOT 6
- qt 4.8.7 download site HOT 1
- warning when installing ncurses on mac 11.2.3 HOT 2
- fix drawing performance on Big Sur HOT 1
- failed to install qt4 on my mac HOT 1
- brew install cartr/qt4/pyqt fails on MacOs Monterey HOT 4
- brew tap fails with invalid formula due to disabled bottle :unneeded HOT 3
- brew install cartr/qt4/[email protected] fails on Monterey HOT 4
- MacOS M1 error installation HOT 5
- brew install cartr/qt4/qt@4 in Apple M1 Pro machine , make error, please help! HOT 1
- "brew install qt@4" doesn't work on Apple Silicon HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebrew-qt4.