# Can't install Skim and gtk-qt4-engine using ports



## shaoxuan (May 11, 2009)

Hi guys,

I'm unable to install skim using ports. My OS is FreeBSD 7.1.

```
[root@pcbsd]/usr/ports/textproc/skim(39)# make install
===> skim-1.4.5_2 depends on file: /usr/local/bin/python2.5 - found
===> skim-1.4.5_2 depends on file: /usr/local/bin/moc - not found
===> Verifying install for /usr/local/bin/moc in /usr/ports/x11-toolkits/qt33
===> qt-copy-3.3.8_9 depends on executable: qmake - found
===> qt-copy-3.3.8_9 depends on file: /usr/local/libdata/pkgconfig/inputproto.pc - found
===> qt-copy-3.3.8_9 depends on file: /usr/local/libdata/pkgconfig/xinerama.pc - found
===> qt-copy-3.3.8_9 depends on file: /usr/local/libdata/pkgconfig/sm.pc - found
===> qt-copy-3.3.8_9 depends on file: /usr/local/libdata/pkgconfig/xi.pc - found
===> qt-copy-3.3.8_9 depends on shared library: mng - found
===> qt-copy-3.3.8_9 depends on shared library: png - found
===> qt-copy-3.3.8_9 depends on shared library: jpeg - found
===> qt-copy-3.3.8_9 depends on shared library: Xft.2 - found
===> qt-copy-3.3.8_9 depends on shared library: cups.2 - found
===> qt-copy-3.3.8_9 depends on shared library: audio - found
===> qt-copy-3.3.8_9 depends on shared library: GLU.1 - found
===> Configuring for qt-copy-3.3.8_9

The specified system/compiler is not supported:

/usr/ports/x11-toolkits/qt33/work/qt-x11-free-3.3.8/mkspecs//usr/local/share/qt/mkspecs/freebsd-g++

Please see the PLATFORMS file for a complete list.

===> Script "configure" failed unexpectedly.
Please report the problem to [email]kde@FreeBSD.org[/email] [maintainer] and attach the
"/usr/ports/x11-toolkits/qt33/work/qt-x11-free-3.3.8/config.log" including
the output of the failure of your make command. Also, it might be a good idea
to provide an overview of all packages installed on your system (e.g. an `ls
/var/db/pkg`).
*** Error code 1

Stop in /usr/ports/x11-toolkits/qt33.
*** Error code 1

Stop in /usr/ports/x11-toolkits/qt33.
*** Error code 1

Stop in /usr/ports/textproc/skim.
[root@pcbsd]/usr/ports/textproc/skim(40)#
```
Any ideas?

Thanks,
Shao


----------



## shaoxuan (May 11, 2009)

Hi,

The gtk-qt4-engine in also failed:

```
[root@pcbsd]/usr/ports/x11-themes/gtk-qt4-engine(63)# make install
===> Vulnerability check disabled, database not found
===> Found saved configuration for gtk-qt4-engine-1.1_1
===> Extracting for gtk-qt4-engine-1.1_1
=> MD5 Checksum mismatch for gtk-qt-engine-1.1.
=> SHA256 Checksum mismatch for gtk-qt-engine-1.1.
===> Refetch for 1 more times files: gtk-qt-engine-1.1 gtk-qt-engine-1.1
===> Vulnerability check disabled, database not found
===> Found saved configuration for gtk-qt4-engine-1.1_1
=> gtk-qt-engine-1.1 doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from [url]http://gtk-qt.ecs.soton.ac.uk/files/1.1/[/url].
: [url]http://gtk-qt.ecs.soton.ac.uk/files/1.1[/url] ... engine-1.1
gtk-qt-engine-1.1.4
[ 0%] ........

===> Vulnerability check disabled, database not found
===> Found saved configuration for gtk-qt4-engine-1.1_1
=> MD5 Checksum mismatch for gtk-qt-engine-1.1.
=> SHA256 Checksum mismatch for gtk-qt-engine-1.1.
===> Giving up on fetching files: gtk-qt-engine-1.1 gtk-qt-engine-1.1
Make sure the Makefile and distinfo file (/usr/ports/x11-themes/gtk-qt4-engine/distinfo)
are up to date. If you are absolutely sure you want to override this
check, type "make NO_CHECKSUM=yes [other args]".
*** Error code 1

Stop in /usr/ports/x11-themes/gtk-qt4-engine.
*** Error code 1

Stop in /usr/ports/x11-themes/gtk-qt4-engine.
*** Error code 1

Stop in /usr/ports/x11-themes/gtk-qt4-engine.
[root@pcbsd]/usr/ports/x11-themes/gtk-qt4-engine(64)#
```
What's wrong with it??

Thanks,
Shao


----------



## shaoxuan (May 13, 2009)

Hi,

I have found out that the second problem is due to network problem. I deleted the related packages in distfiles folder and make again, the checksum is OK now.

By the way, what is lQtCore? I want to install qt4-gui using ports, but:


```
/usr/bin/ld: cannot find -lQtCore                                               
*** Error code 1                                                                

Stop in /usr/ports/x11-toolkits/qt4-gui/work/qt-x11-opensource-src-4.4.3/src/gui.                                                                               
*** Error code 1                                                                

Stop in /usr/ports/x11-toolkits/qt4-gui.
*** Error code 1
```


----------



## DutchDaemon (May 13, 2009)

That would be devel/qt4-corelib. It's a (run and build) dependency of qt4-gui which should've been pulled in on the fly.


----------



## shaoxuan (May 13, 2009)

Hi,

Thanks for your reply. I have installed devel/qt4-corelib, but the problem is still exist. Any ideas?


----------



## DutchDaemon (May 13, 2009)

Just a guess: try [cmd=]ldconfig -m /usr/local/lib/qt4[/cmd]


----------



## peetaur (Feb 3, 2012)

3 years later, and I have the same problem. (main goal is to build virtualbox-ose version 4.0.14, and I don't care if it doesn't have a GUI, but I would like VNC support.)



```
[root@bczfsvm1 /usr/ports/devel]# ls -1 /usr/local/lib/*qt*
libQtCore.la
libQtCore.prl
libQtCore.so
libQtCore.so.4
libQtCore.so.4.7
libQtCore.so.4.7.4
libQtNetwork.la
libQtNetwork.prl
libQtNetwork.so
libQtNetwork.so.4
libQtNetwork.so.4.7
libQtNetwork.so.4.7.3
libQtOpenGL.la
libQtOpenGL.prl
libQtOpenGL.so
libQtOpenGL.so.4
libQtOpenGL.so.4.7
libQtOpenGL.so.4.7.3
plugins

(where this is the contents of a directory called qt4)
```

Here you can see that almost nothing pulls its dependencies properly / links to the installed libQtCore.so.

```
cd/usr/ports/devel; 
for f in $(ls -1d qt*); do cd $f; echo $f; make install 2>&1 | grep -E "cannot find"; cd ..; done
qt4
/usr/bin/ld: cannot find -lQtCore
qt4-assistant
/usr/bin/ld: cannot find -lQtCore
qt4-assistant-adp
/usr/bin/ld: cannot find -lQtCore
qt4-corelib
qt4-declarative
/usr/bin/ld: cannot find -lQtCore
qt4-designer
/usr/bin/ld: cannot find -lQtCore
qt4-help
/usr/bin/ld: cannot find -lQtCore
qt4-help-tools
/usr/bin/ld: cannot find -lQtCore
qt4-libqtassistantclient
/usr/bin/ld: cannot find -lQtCore
qt4-linguist
/usr/bin/ld: cannot find -lQtCore
qt4-makeqpf
/usr/bin/ld: cannot find -lQtCore
qt4-moc
qt4-porting
/usr/bin/ld: cannot find -lQtCore
qt4-qdbusviewer
/usr/bin/ld: cannot find -lQtCore
qt4-qdoc3
/usr/bin/ld: cannot find -lQtCore
qt4-qt3support
/usr/bin/ld: cannot find -lQtCore
qt4-qtestlib
/usr/bin/ld: cannot find -lQtCore
qt4-qtsolutions-singleapplication
/usr/bin/ld: cannot find -lQtCore
qt4-qvfb
/usr/bin/ld: cannot find -lQtCore
qt4-rcc
qt4-script
/usr/bin/ld: cannot find -lQtCore
qt4-scripttools
/usr/bin/ld: cannot find -lQtCore
qt4-uic
qt4-uic3
/usr/bin/ld: cannot find -lQtCore
qtcreator
/usr/bin/ld: cannot find -lQtCore
qtscriptgenerator
/usr/bin/ld: cannot find -lQtCore
```

`# ldconfig -m /usr/local/lib/qt4` has no effect.


```
# uname -a
FreeBSD bczfsvm1.bc.local 8.2-STABLE-20110927 FreeBSD 8.2-STABLE-20110927 #0: Thu Jan 26 12:07:29 UTC 2012     
root@bcnas1bak.bc.local:/usr/obj/usr/src/sys/GENERIC  amd64
```

And I recently ran `# portsnap fetch update && portsnap extract && portsnap update`

I also tried `# make deinstall && make clean && make reinstall` for qt4-corelib.

I also tried:

```
cd /usr/local/lib
ln -s qt4 qt
```

which didn't work.

Then I tried this splendidly simple hack:
	
	



```
cd /usr/local/lib/qt4
for f in `ls -1`; do ln -s `pwd`/$f /usr/local/lib/; done
```

Now the devel/qt4 port gets much further... here are more errors, fixed by the same hack rerun:

```
/usr/bin/ld: cannot find -lQtSql
/usr/bin/ld: cannot find -lQtCLucene
```

And then I get:

```
graphicsitems/qdeclarativeitem.h:95: Parse error at "REVISION"
```

`# portsclean -C` and rebuild did not fix this.

Here is graphicsitems/qdeclarativeitem.h around line 95

```
Q_PROPERTY(QDeclarativeItem * parent READ parentItem WRITE setParentItem NOTIFY parentChanged DESIGNABLE false FINAL)
    Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeListProperty<QObject> data READ data DESIGNABLE false)
    Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeListProperty<QObject> resources READ resources DESIGNABLE false)
    Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeListProperty<QDeclarativeState> states READ states DESIGNABLE false
)
    Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeListProperty<QDeclarativeTransition> transitions READ transitions D
ESIGNABLE false)
...cut out an arbitrary number of lines...
    Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint) // transformOriginPoint is read-only for Item
    Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged)
    Q_PROPERTY(qreal implicitWidth READ implicitWidth WRITE setImplicitWidth NOTIFY implicitWidthChanged REVISION 1) // *** THIS IS LINE 95
    Q_PROPERTY(qreal implicitHeight READ implicitHeight WRITE setImplicitHeight NOTIFY implicitHeightChanged REVISION 1)

    Q_ENUMS(TransformOrigin)
    Q_CLASSINFO("DefaultProperty", "data")
```

So since hackery is not so simple, what is the correct way to fix this? Do I need to upgrade to the latest RELENG_8? Why should my system be so inconsistent with these ports? When I use portsnap to download, does it download something that should always work in my system? Or only in the latest major release? latest minor release? -STABLE? -CURRENT?


----------



## peetaur (Feb 4, 2012)

I used csup and installed the latest RELENG_8, and I have the same problem. Here is the last (compile?) command and the errors that follow.

```
/usr/ports/devel/qt4-declarative/work/qt-everywhere-opensource-src-4.7.4/bin/moc -DQT_SHARED -DQT_BUILD_DECLARATIVE_LIB -DQT_NO_URL_CAST_FROM_STRING -
DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DQT_NO_OPENTYPE -
DQT_NO_DEBUG -DQT_SCRIPT_LIB -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XMLPATTERNS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_SSE -D
QT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I.
-I../../include/QtCore -I../../include/QtNetwork -I../../include/QtGui -I../../include/QtXmlPatterns -I../../include/QtSql -I../../include/QtSvg -I../
../include/QtScript -I../../include -I../../include/QtDeclarative -I.rcc/release-shared -Iutil -Igraphicsitems -Iqml -Iqml/parser -Iqml/rewriter -Ideb
ugger -I../3rdparty/harfbuzz/src -I.moc/release-shared -I/usr/local/include util/qdeclarativebind_p.h -o .moc/release-shared/moc_qdeclarativebind_p.cp
p
graphicsitems/qdeclarativeitem.h:95: Parse error at "REVISION"
*** Error code 1
1 error
*** Error code 1

Stop in /usr/ports/devel/qt4-declarative.
*** Error code 1

Stop in /usr/ports/devel/qt4-designer.
*** Error code 1

Stop in /usr/ports/devel/qt4-linguist.
*** Error code 1

Stop in /usr/ports/emulators/virtualbox-ose.
*** Error code 1

Stop in /usr/ports/emulators/virtualbox-ose.
```


----------



## peetaur (Feb 4, 2012)

So, maybe it is fixed now (taking very long to build on this old slow machine)... 

Here is what I did (and don't know if one or the other fixes it alone, only tried both):


```
cd /usr/ports/devel/automoc4
make clean deinstall reinstall

cd /usr/ports/devel/qt4-moc/
make clean deinstall reinstall
```


----------



## peetaur (Feb 4, 2012)

Yep, it worked eventually. Also needed 2 more things:

The glib port needed an update.

```
cd /usr/ports/devel/glib20
make clean deinstall reinstall
```

and run my symlink hack again. Here is an automatic version of it:

```
cd /usr/local/lib/qt4
while [ '!' -f /root/stop ]; do 
    for f in $(ls -1); do 
        ln -s `pwd`/$f /usr/local/lib/ 2>&1 | grep -v "File exists"
    done
    sleep 5
done
```


----------



## peetaur (Feb 7, 2012)

FYI: I built VirtualBox on another system without any of these problems. I think my problem was caused by building virtualbox 3.2.12 first before updating ports with portsnap to get virtualbox 4.0.14.


----------

