I know im running an unsupported version of OpenBSD (4.7), but at the moment ive got a webproject going and dont really have the time to set everything up again, and ive never upgraded before so i dont wanna screw anything up.

To my question.

Im using prestashop webshop on my server and it depends on an php5-gd extension, that depends on some xWindows libs that i dont have or want.

Trying to install php5 extension via package results in:

Can't install php5-gd-5.2.12 because of libraries
|library X11.12.0 not found
| not found anywhere
|library Xpm.8.0 not found
| not found anywhere
|library freetype.17.0 not found
| not found anywhere
Direct dependencies for php5-gd-5.2.12 resolve to: jpeg-7 php5-core-5.2.12p1 t1lib-5.1.0p1 png-1.2.41
Full dependency tree is jpeg-7 libxml-2.7.6 php5-core-5.2.12p1 t1lib-5.1.0p1 gettext-0.17p0 png-1.2.41 libiconv-1.13p0

From ports
Tried setting flavors to no_x11, changed the makefile option use_X11 to no, make install WITHOUT_X11=yes. Nothing is working

building from ports without a full system installation is not supported, even for no_x11 flavours, and a system without X libraries will seriously restrict the packages you can install.

Not supported.

And if I might anticipate the next question...If I place a Windows 98 exe with known vulnerabilities on a Windows 7 machine, at what point does the Windows 7 machine become vulnerable? When the file is placed on disk, or when the exe is executed?

In other words, as long as you aren't *running* X, your server is safe

Ok thanks for your answer, can i just install the x packages with pkg_add or do i have to reinstall?

And why would these ports even have a no_x11 option in the makefile if its not supported one might wonder. Are some ports that depend on these libs installable and others not. Pretty misleading that this option is there if its not supported.

As for your other question, building ports involves building many dependencies. Building some of these dependencies requires X libraries on occasion. Section 15.4 describes this in more detail:

Quote:

Another common failure is a missing X11 installation. Even if the port you try to build has no
direct dependency on X11, a subpackage of it or its dependencies may require X11 headers
and libraries. Building ports on systems without X11 is not supported, so if you insist on doing
so, you are on your own to figure it out. For many ports, there are, however, "no_x11"
flavored packages available, which you can install without needing X11 on your system.

The requirement for installing X11 before building has not always been mandated. The problem is that too many people were asking "Why does my application not build?" so often that the result was simpler to make it a requirement. Far too many weren't sifting through the details themselves.

That's right...when I was porting umurmur to OpenBSD, there were no direct/indirect X requirements (umurmur is a very simple program written in C, with very few dependencies), but when I was working on building murmur (the "official" Mumble server), it requires qmake (from qt4) to build...and qt4 requires X. Once murmur is built, it no longer requires qmake, but to build it you need X.

It's far from optimal...but the blame can't be placed on the OpenBSD developers for murmur requiring a build dependency that requires X.

And since the OP needs to upgrade anyways, I personally would just reinstall to 4.9 and kill two birds with one stone...but that's just me.