Re: Problem with compat9x

2013-12-18 Thread Jung-uk Kim
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2013-12-17 05:56:01 -0500, Bernhard Fröhlich wrote:
 On Tue, Dec 17, 2013 at 12:41 AM, Jung-uk Kim j...@freebsd.org
 wrote:
 On 2013-12-16 14:57:55 -0500, Bernhard Fröhlich wrote:
 
 Yes I am aware of that and if you look at the commit history
 you will see that I have tried to fix that issue with the last
 commit. It has fixed the issue for a couple of vbox binaries
 (VBoxSVC, VBoxManage) but some are still broken. (VBoxHeadless,
 VirtualBox)
 
 The conflicts entry for compat9x was there already and I will
 need to add it again as it seems.
 
 BTW, I have a real fix for the problem, i.e., build with Clang
 (well, as much as possible).  In fact, only couple of files
 (under src/recompiler) are absolutely needed to be compiled with
 GCC in 4.3.x.  Therefore, there is no need for libstdc++.so
 dependency at all.
 
 Here are my experimental ports (based on official vbox@ ports,
 i.e., https://redports.org/browser/virtualbox/emulators)
 
 http://redports.org/browser/jkim/emulators
 
 Probably I don't understand what you want to archive but I don't
 think patching virtualbox to compile 95% of it with clang and still
 having to compile the remaining 5% with gcc is of any benefit.

% find VirtualBox-4.3.4 -type f \( -name *.c -or -name *.cpp \) |
wc -l
6187
% find VirtualBox-4.3.4/src/recompiler -type f \( -name *.c -or
- -name *.cpp \) | wc -l
  28

It's at least 99%. ;-)

Seriously, my point is we need to reduce libstdc++.so dependency from
ports tree at all cost because '-rpath' is really asking for serious
trouble in the long run (*unless* the binary is completely
self-contained, of course), IMHO.  I had very unpleasant experience
with LibreOffice and I learned it the hard way.  Whatever I do with
the port, people always complained that something is broken in a weird
way.  Almost every time, I found some *.so from its dependencies are
built with different C++ headers and runtime.  Imagine you have foo.so
built with g++48 and bar.so built with g++46 and an executable built
with libc++.so and requiring them both, directly or indirectly, for
example.  No fun at all. :-(

 We need to carry all the clang patches in our port which makes it a
 big beast and have likely no chance to get those workarounds
 included upstream because they won't accept patches for a compiler
 that can't fully build vbox.

Patches are not too big.  In fact, many patches are also beneficial to
GCC build because most of them fix compiler warnings with GCC, too.  I
don't see any problem of submitting those patches.

Actually, the recompiler (based on ancient QEMU) must be updated to
remove GCC dependency in the first place, i.e., the infamous global
register, IMHO.  FYI, recent QEMU can be built with Clang just fine.

 The issue that this thread talks about can be fixed in a much
 simpler way. In fact the VBoxHeadless and VirtualBox binaries do
 not have a RPATH at all - so all we need to do is fix the vbox
 buildsystem to add the RPATH to those binaries too like they
 already do for VBoxSVC and VBoxManage.

Obviously, I do not agree with the simpler fix. ;-)

Jung-uk Kim
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (FreeBSD)

iQEcBAEBAgAGBQJSsfFXAAoJEHyflib82/FG3ocH/3r4jRTFDG8OQz9MeCt5ezlq
85Fq5cwTBvCSgAsqviqljbBmiwCnfQz0GcL/prA0A1O9AAWCOK74KwGCF3MkfIpW
FZxnpvqF7T2pBM7Z7wwhBTfzdJEnhtbRCu8TdM4SvmnGGKxsl+SS6sM8ioRjapAK
+SuuRBrOnNxGxCb1e50OGnZ4n1lA1AnP28E8SJrgkp8I1CIdS9sdoOS/weE4bPVR
7Mnkz0WioMYAQDPlLfILwXKaksl1UCI3Xn7IObHH+UVZu0jP3rbWbQ8Xe7f430s9
dQBR5F5d9uxxr2QCs7itXKgA8skViC40gUyerTAQTmGqlYUMF3cbflfeF1MCSZk=
=eplO
-END PGP SIGNATURE-
___
freebsd-emulation@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to freebsd-emulation-unsubscr...@freebsd.org


Re: Problem with compat9x

2013-12-18 Thread Bernhard Fröhlich
Am 18.12.2013 20:02 schrieb Jung-uk Kim j...@freebsd.org:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 2013-12-17 05:56:01 -0500, Bernhard Fröhlich wrote:
  On Tue, Dec 17, 2013 at 12:41 AM, Jung-uk Kim j...@freebsd.org
  wrote:
  On 2013-12-16 14:57:55 -0500, Bernhard Fröhlich wrote:
 
  Yes I am aware of that and if you look at the commit history
  you will see that I have tried to fix that issue with the last
  commit. It has fixed the issue for a couple of vbox binaries
  (VBoxSVC, VBoxManage) but some are still broken. (VBoxHeadless,
  VirtualBox)
 
  The conflicts entry for compat9x was there already and I will
  need to add it again as it seems.
 
  BTW, I have a real fix for the problem, i.e., build with Clang
  (well, as much as possible).  In fact, only couple of files
  (under src/recompiler) are absolutely needed to be compiled with
  GCC in 4.3.x.  Therefore, there is no need for libstdc++.so
  dependency at all.
 
  Here are my experimental ports (based on official vbox@ ports,
  i.e., https://redports.org/browser/virtualbox/emulators)
 
  http://redports.org/browser/jkim/emulators
 
  Probably I don't understand what you want to archive but I don't
  think patching virtualbox to compile 95% of it with clang and still
  having to compile the remaining 5% with gcc is of any benefit.

 % find VirtualBox-4.3.4 -type f \( -name *.c -or -name *.cpp \) |
 wc -l
 6187
 % find VirtualBox-4.3.4/src/recompiler -type f \( -name *.c -or
 - -name *.cpp \) | wc -l
   28

 It's at least 99%. ;-)

 Seriously, my point is we need to reduce libstdc++.so dependency from
 ports tree at all cost because '-rpath' is really asking for serious
 trouble in the long run (*unless* the binary is completely
 self-contained, of course), IMHO.  I had very unpleasant experience
 with LibreOffice and I learned it the hard way.  Whatever I do with
 the port, people always complained that something is broken in a weird
 way.  Almost every time, I found some *.so from its dependencies are
 built with different C++ headers and runtime.  Imagine you have foo.so
 built with g++48 and bar.so built with g++46 and an executable built
 with libc++.so and requiring them both, directly or indirectly, for
 example.  No fun at all. :-(

Yes, I agree that it is a problem if we start mixing compilers. But wait we
are already way past that point because we introduced clang as default
compiler. There are quite a few more ports that break in strange ways
because of that mix.

  We need to carry all the clang patches in our port which makes it a
  big beast and have likely no chance to get those workarounds
  included upstream because they won't accept patches for a compiler
  that can't fully build vbox.

 Patches are not too big.  In fact, many patches are also beneficial to
 GCC build because most of them fix compiler warnings with GCC, too.  I
 don't see any problem of submitting those patches.

I have no problem to send patches which fix real problems but I don't want
us to be like debian where people push boatloads of questionable patches on
top of a 3rd party project.

 Actually, the recompiler (based on ancient QEMU) must be updated to
 remove GCC dependency in the first place, i.e., the infamous global
 register, IMHO.  FYI, recent QEMU can be built with Clang just fine.

Yes I know about that and seriously the only way to get that done is by
talking to upstream. If someone provides patches for that I would like to
see them committed upstream first. The recompiler is a core part of vbox so
I don't think we should be the testbed for such experiments just because we
like to build stuff with clang.

  The issue that this thread talks about can be fixed in a much
  simpler way. In fact the VBoxHeadless and VirtualBox binaries do
  not have a RPATH at all - so all we need to do is fix the vbox
  buildsystem to add the RPATH to those binaries too like they
  already do for VBoxSVC and VBoxManage.

 Obviously, I do not agree with the simpler fix. ;-)

It was the only fix I could provide in time for 10.0. Yes, rpath is not the
magic bullet but it gives us time to work on better fixes.

Please don't get me wrong. I am actually very happy with clang as a
compiler and I use it also for some of my own code. But I still think it is
the wrong choice for ports and we have created a lot of problems with that
which will need a lot of our attention and time in the future. We are still
depending very strong on the base compiler which we shouldn't. We are now
adding hacks and crap like that rpath stuff or even heavily patch ports -
for nothing! IMHO using a gcc48 as ports compiler would be the way to go.

(this mail is my personal opinion)
___
freebsd-emulation@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to freebsd-emulation-unsubscr...@freebsd.org


Re: Problem with compat9x

2013-12-17 Thread Bernhard Fröhlich
On Tue, Dec 17, 2013 at 12:41 AM, Jung-uk Kim j...@freebsd.org wrote:
 On 2013-12-16 14:57:55 -0500, Bernhard Fröhlich wrote:

 Yes I am aware of that and if you look at the commit history you
 will see that I have tried to fix that issue with the last commit.
 It has fixed the issue for a couple of vbox binaries (VBoxSVC,
 VBoxManage) but some are still broken. (VBoxHeadless, VirtualBox)

 The conflicts entry for compat9x was there already and I will need
 to add it again as it seems.

 BTW, I have a real fix for the problem, i.e., build with Clang (well,
 as much as possible).  In fact, only couple of files (under
 src/recompiler) are absolutely needed to be compiled with GCC in
 4.3.x.  Therefore, there is no need for libstdc++.so dependency at all.

 Here are my experimental ports (based on official vbox@ ports, i.e.,
 https://redports.org/browser/virtualbox/emulators)

 http://redports.org/browser/jkim/emulators

Probably I don't understand what you want to archive but I don't think
patching virtualbox to compile 95% of it with clang and still having to
compile the remaining 5% with gcc is of any benefit. We need to carry
all the clang patches in our port which makes it a big beast and have
likely no chance to get those workarounds included upstream because
they won't accept patches for a compiler that can't fully build vbox.

The issue that this thread talks about can be fixed in a much simpler
way. In fact the VBoxHeadless and VirtualBox binaries do not have a
RPATH at all - so all we need to do is fix the vbox buildsystem to add
the RPATH to those binaries too like they already do for VBoxSVC and
VBoxManage.

-- 
Bernhard Froehlich
http://www.bluelife.at/
___
freebsd-emulation@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to freebsd-emulation-unsubscr...@freebsd.org


Problem with compat9x

2013-12-16 Thread Jason Bacon


Are you aware that the latest VirtualBox won't start on 10.0 is compat9x 
is installed?


Compat9x is required by openjdk7, BTW.  Removing openjdk7 and compat9x 
eliminates the problem.  Reinstalling them brings it back. I tried 
installing virtualbox-ose using pkg and from source with the same results.


Regards,

Jason
~~

FreeBSD oyster bacon ~/Books/Computer-books/HPC/Common 403: VirtualBox
VirtualBox: Error -610 in supR3HardenedMainInitRuntime!
VirtualBox: dlopen(/usr/local/lib/virtualbox/VBoxRT.so,) failed: 
/usr/local/lib/compat/libstdc++.so.6: version GLIBCXX_3.4.15 required by 
/usr/local/lib/virtualbox/VBoxRT.so not found


VirtualBox: Tip! It may help to reinstall VirtualBox.

FreeBSD oyster bacon ~/Books/Computer-books/HPC/Common 408: pkg info 
virtualbox-ose 'compat*'

virtualbox-ose-4.2.20_1
compat9x-amd64-9.2.902000.201310

FreeBSD oyster bacon ~/Books/Computer-books/HPC/Common 409: uname -a
FreeBSD oyster.jbacon.dyndns.org 10.0-RC1 FreeBSD 10.0-RC1 #0 r259068: 
Sat Dec  7 17:45:20 UTC 2013 
r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

~~
___
freebsd-emulation@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to freebsd-emulation-unsubscr...@freebsd.org


Re: Problem with compat9x

2013-12-16 Thread Bernhard Fröhlich
Am 16.12.2013 19:40 schrieb Jason Bacon jwba...@tds.net:


 Are you aware that the latest VirtualBox won't start on 10.0 is compat9x
is installed?

 Compat9x is required by openjdk7, BTW.  Removing openjdk7 and compat9x
eliminates the problem.  Reinstalling them brings it back. I tried
installing virtualbox-ose using pkg and from source with the same results.

 Regards,

 Jason
 ~~

 FreeBSD oyster bacon ~/Books/Computer-books/HPC/Common 403: VirtualBox
 VirtualBox: Error -610 in supR3HardenedMainInitRuntime!
 VirtualBox: dlopen(/usr/local/lib/virtualbox/VBoxRT.so,) failed:
/usr/local/lib/compat/libstdc++.so.6: version GLIBCXX_3.4.15 required by
/usr/local/lib/virtualbox/VBoxRT.so not found

 VirtualBox: Tip! It may help to reinstall VirtualBox.

 FreeBSD oyster bacon ~/Books/Computer-books/HPC/Common 408: pkg info
virtualbox-ose 'compat*'
 virtualbox-ose-4.2.20_1
 compat9x-amd64-9.2.902000.201310

 FreeBSD oyster bacon ~/Books/Computer-books/HPC/Common 409: uname -a
 FreeBSD oyster.jbacon.dyndns.org 10.0-RC1 FreeBSD 10.0-RC1 #0 r259068:
Sat Dec  7 17:45:20 UTC 2013 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC
 amd64

Yes I am aware of that and if you look at the commit history you will see
that I have tried to fix that issue with the last commit. It has fixed the
issue for a couple of vbox binaries (VBoxSVC, VBoxManage) but some are
still broken. (VBoxHeadless, VirtualBox)

The conflicts entry for compat9x was there already and I will need to add
it again as it seems.
___
freebsd-emulation@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to freebsd-emulation-unsubscr...@freebsd.org


Re: Problem with compat9x

2013-12-16 Thread Jung-uk Kim
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2013-12-16 14:57:55 -0500, Bernhard Fröhlich wrote:
 Am 16.12.2013 19:40 schrieb Jason Bacon jwba...@tds.net:
 
 
 Are you aware that the latest VirtualBox won't start on 10.0 is
 compat9x
 is installed?
 
 Compat9x is required by openjdk7, BTW.  Removing openjdk7 and
 compat9x
 eliminates the problem.  Reinstalling them brings it back. I tried 
 installing virtualbox-ose using pkg and from source with the same
 results.
 
 Regards,
 
 Jason ~~
 
 FreeBSD oyster bacon ~/Books/Computer-books/HPC/Common 403:
 VirtualBox VirtualBox: Error -610 in
 supR3HardenedMainInitRuntime! VirtualBox:
 dlopen(/usr/local/lib/virtualbox/VBoxRT.so,) failed:
 /usr/local/lib/compat/libstdc++.so.6: version GLIBCXX_3.4.15
 required by /usr/local/lib/virtualbox/VBoxRT.so not found
 
 VirtualBox: Tip! It may help to reinstall VirtualBox.
 
 FreeBSD oyster bacon ~/Books/Computer-books/HPC/Common 408: pkg
 info
 virtualbox-ose 'compat*'
 virtualbox-ose-4.2.20_1 compat9x-amd64-9.2.902000.201310
 
 FreeBSD oyster bacon ~/Books/Computer-books/HPC/Common 409: uname
 -a FreeBSD oyster.jbacon.dyndns.org 10.0-RC1 FreeBSD 10.0-RC1 #0
 r259068:
 Sat Dec  7 17:45:20 UTC 2013
 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
 
 Yes I am aware of that and if you look at the commit history you
 will see that I have tried to fix that issue with the last commit.
 It has fixed the issue for a couple of vbox binaries (VBoxSVC,
 VBoxManage) but some are still broken. (VBoxHeadless, VirtualBox)
 
 The conflicts entry for compat9x was there already and I will need
 to add it again as it seems.

BTW, I have a real fix for the problem, i.e., build with Clang (well,
as much as possible).  In fact, only couple of files (under
src/recompiler) are absolutely needed to be compiled with GCC in
4.3.x.  Therefore, there is no need for libstdc++.so dependency at all.

Here are my experimental ports (based on official vbox@ ports, i.e.,
https://redports.org/browser/virtualbox/emulators)

http://redports.org/browser/jkim/emulators

Cheers,

Jung-uk Kim

* PS: You can also download the ports tarball from here.

http://people.freebsd.org/~jkim/virtualbox-4.3.4-ports.tar.bz2
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (FreeBSD)

iQEcBAEBAgAGBQJSr4+NAAoJEHyflib82/FG8L4H/RStQf5zJfI6jl/QWyP9AoFr
ph9NLcxVv2AKbzlblJsVsfyf0Vh8OtLJlGTGyStOlenZ0UiXTXYoNuSva6gsKF/A
1vzDYg2ZfeUKbKjNAyfFPzrT9vm6CPWbaYLW6Sd7GH0DvlO1jxWY90O8ozjUCsAF
SDRszDl3TymkMFhErAes25I59G+T03bdtx09wtKpI575F7CVbGPG/JcleQlP8Lyb
jFxZ670yT+63qWyyx1inXwLfztogZEj/ntmW8Z45fiv/H2OJwPiENUsvfAjSbU6v
5BVOdUUFJ44leyhDGMCroM7PKZPNo0L2MGayMQbB23DAOLr6hBaBBW3d2s7OXEY=
=U1om
-END PGP SIGNATURE-
___
freebsd-emulation@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to freebsd-emulation-unsubscr...@freebsd.org


Re: Problem with compat9x

2013-12-16 Thread Jung-uk Kim
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2013-12-16 13:29:10 -0500, Jason Bacon wrote:
 Compat9x is required by openjdk7, BTW.  Removing openjdk7 and
 compat9x eliminates the problem.
...

BTW, you do not need compat9x for OpenJDKs to *run*.  You can safely
remove bootstrap-openjdk and compat8x/compat9x once you are done
building them.  In fact, it is highly recommended.  Please see
pkg-message:

http://svnweb.freebsd.org/ports/head/java/bootstrap-openjdk/pkg-message?revision=305745view=co

Jung-uk Kim
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (FreeBSD)

iQEcBAEBAgAGBQJSr5Q4AAoJEHyflib82/FGeN8H/3acXAY4807FyEwfBW9GFduh
bur3wS5QSkJCbKZvk4aFzWLvTlkV+pcVwTqOlVMixNfp/wHoXPC0n8vGsWA94JEi
ltsIGig1nQhYO843QemjynODIx4ifchXAgtnb+uePUJ6xdx3nBjhs6tvm67Uj5C1
68C6zm63jjyNPy8hRLv9zeDMsYN4tAusRVBinkfRl7s0e/XlmOL0DF2urOB1jTCk
20Q+qJJai6eEVPrPletWRcsSFqd4+OTsBpNBXred9WIFlNnP++GAohpZP+Qsj0BL
x1WEeEv5h1La0af6lSakAQkiEEOEan/+Gl+oLcSEdT73mA2EHvEylLPPYDQMZfM=
=S0PS
-END PGP SIGNATURE-
___
freebsd-emulation@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to freebsd-emulation-unsubscr...@freebsd.org