[desktop-discuss] JDS Solaris 10u4
Mark Wright
markwright at myrealbox.com
Fri Nov 2 04:13:28 PDT 2007
> Ghee wrote:
> Hi Mark,
>
> This is awsome! I am sure someone somewhere will find this work most
> useful :)
Hello Ghee,
Thanks. Of course it never would have worked at all if not
for the hard work of everyone else on the JDS project, and
for Laca (and I guess others that I don't know of, sorry)
for committing fixes for an earlier build of JDS to
build on Solaris 10, thanks very much.
I guess it would be more useful if the fixes could
be integrated into JDS. The gnome-2-20 branch is in restrictive
update mode now. And the current state of JDS gnome 2.20.1
is kind of experimental. I guess this means that if anyone
else is interested in JDS on Solaris 10, that maybe the
next gnome 2.22 stable release might be a goal to work towards?
> How does the new JDS run like? Any major problem that you are coming across?
I have gnome 2.20.1 from the gnome-2-20 branch built mostly
with Sun Studio 12 running on my Solaris 10u4 box now.
I had to build thunderbird and firefox with Sun Studio 11 to avoid
a Sun Studio 12 compiler bug. I have only done limited testing.
I did this build with the current release of Open Sound System
installed. The only thing I've done with sound so far is to
make Ekiga work with OSS, I'll post another thread about that.
Other things with sound fail, maybe because of me building
liboil with Sun Studio 12, one error is:
Failed to construct test pipeline for 'gconfaudiosrc ! audioconvert ! audioresample ! gconfaudiosink profile=chat'
> Mark Wright wrote:
> > Hi,
> >
> > I raised the following bug reports with some proposed fixes for compiling
> > JDS on Solaris 10u4 with Sun Studio 11:
> >
> > CR 6623026 Undefined symbol bus_config_parser_check_doctype linking dbus-daemon-launch-help
> > CR 6623029 libgnomeprint-2.0-font-install link Undefined symbol floor
> >
> I will take a look at these two CRs above :) and see if I can integrate
> the fix.
> Thanks,
>
> -Ghee
Great, thanks.
| Earlier I wrote:
|
| (3) To fix:
|
| goanna% scrollkeeper-update
| /usr/bin/scrollkeeper-update: line 419: syntax error: unexpected end of file
| goanna%
| ...
I filed a bug report with my proposed trivial fix some days ago:
Synopsis
rarian-sk-update: line 419: syntax error: unexpected end of file
However I haven't receive the bug number for that. I guess
I'll try upstreaming it.
| (9) gnome-mag Package requirements (xcomposite xrender) were not met
|
| I raised another bug report with my proposed fix, will let you know
| when I have the bug number.
It is:
CR 6623801 gnome-mag Package requirements (xcomposite xrender) were not met]
> Brian wrote:
> Mark:
>
> Looking at many of these fixes, it looks like the patches are simply
> adding include statements needed for Solaris 10. It would probably
> make good sense to submit these patches upstream to bugzilla.gnome.org
> so that these problems get fixed at the source.
Hello Brian,
I'm obviously a newbie at the JDS development processes.
I was assuming I would need to raise opensolaris bugs
since I don't have JDS subversion write access. However
now I don't see any way for me to update the opensolaris
bug reports to note the bugs that I raised upstream.
> CR 6623026 Undefined symbol bus_config_parser_check_doctype linking dbus-daemon-launch-help
Since this a fix to an existing patch to make it compile on
Solarus 10u4, it does not seem upstreamable.
Maybe I should ask for a code review on jds-review of my fix
to CR 6623026?
> CR 6623029 libgnomeprint-2.0-font-install link Undefined symbol floor
> CR 6623124 brltty "/usr/java/include/jni.h", line 27: cannot find include file: "jni_md.h"
> CR 6623123 SUNWevolution-data-server "/usr/include/sys/byteorder.h", line 60: syntax error
I guess I should upstream these. I have upstreamed the following:
> CR 6623126 musicbrainz "/usr/include/sys/byteorder.h", line 60: Error: uint16_t is not defi
http://bugs.musicbrainz.org/ticket/3364
Ticket #3364 musicbrainz "/usr/include/sys/byteorder.h", line 60: Error: uint16_t is not defined
Bugzilla [Bug 492370] monitor name conflict with libc on solaris10.diff
-> Fix is committed upstream, should appear in 2.10.8.
> > ...
> > I will try to compile liboil with Sun Studio 12.
>
> Note that liboil contains GCC-style assembly for MMX/SSE hardware
> acceleration. I'm not sure Sun Studio 12 can compile this source. Even
> if it can, I bet the assembly is wrapped with "#ifdef GNUC" or somesuch
> that would need to be modified to allow Sun Studio 12 to compile with
> it.
It requires some changes. Sun Studio 12 has some assembler syntax and
multimedia type differences, like:
(a) gcc can infer the size of operands:
cmp $0xff, %%al
While as Sun Studio 12 needs to be told by adding the appropriate
instruction suffix:
cmpb $0xff, %%al
(b) gcc likes arithmetic in brackets, and multiplication is just *, like:
add (" #offset "* 4)(%%esi), %%e" #r1 "x\n"
While as Sun Studio does not want the brackets, and multiplication has
to be escaped:
add " #offset " \\* 4(%%esi), %%e" #r1 "x\n"
(c) However although I could tweak most of the assembler code
to compile with Sun Studio 12, after doing lots of changes,
it does not link due to what appears to be a Sun Studio 12
compiler bug. This is with:
goanna% cc -V
cc: Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12
usage: cc [ options] files. Use 'cc -flags' for details
goanna%
The problem is in the generated assembler function prelude
code, Sun Studio 12 generates memory references to "addl" and "andl":
/ File trans8x8_i386.c:
/ Line 191
...
movl %eax, -40(%ebp)
movl addl, %eax
.L_y4:
movl %edx, -48(%ebp)
.L_y5:
movl %edx, -48(%ebp)
movl andl, %eax
Resulting in linker errors:
/opt/jdsbld/bin/ld-wrapper -G -z text -M .libs/liboiltmp1.so.0.0.0.exp -h liboiltmp1.so.0 -o .libs/liboiltmp1.so.0.0.0 .libs/liboiltmp.o -z allextract ./.libs/liboilfunctions.a -z defaultextract -lm -lc
Text relocation remains referenced
against symbol offset in file
...
andl 0x284 ./.libs/liboilfunctions.a(libi386_la-trans8x8_i386.o)
...
addl 0x279 ./.libs/liboilfunctions.a(libi386_la-trans8x8_i386.o)
ld: fatal: relocations remain against allocatable but non-writable sections
Due to that problem, it is necessary to disable the compilation
of inline assembler with Sun Studio 12. (I managed to patch
SFE gcc 4.2.1 and 4.2.2 to workaround this same Sun Studio 12
bug, the liboil assembler is too compilicated to workaround it.
I'll raise it on the Sun Studio C compiler forum).
It is fairly easy to use the intrinsics though.
As described in:
http://mail.opensolaris.org/pipermail/tools-discuss/2007-July/006710.html
Need to change casts to __mm64 from:
x = (__m64) ll; // where ll is long long and x is __m64
To instead use dereference cast:
x = *(__m64*) ≪
> You can build liboil without the assembly, but if you do, then you don't
> get performance benefit.
Thanks, I compiled liboil without the assembly, and enabled the
instrinsics (but they only compile %if %arch_sse2).
That allowed be to build and run JDS gnome 2.20.1 on Solaris 10u4.
However this liboil stuff and anything dependent on it is most
likely broken.
> You might see if using a newer version of gcc
> might compile the code better.
SFE gcc 4.2.2 compiles the assembler OK. But then an executable
built with liboil crashed with a sigsegv while building
SUNWgnome-media, making me think it might be a better idea
to compile everything with Sun Studio:
pkgbuild: gtk-doc: Linking scanner
pkgbuild: /opt/SunStudio11/SUNWspro/bin/cc -o .libs/gst-plugins-base-libs-scan .libs/gst-plugins-base-libs-scan.o ../../gst-libs/gst/interfaces/.libs/libgstinterfaces-0.10.so -L/usr/X11/lib ../../gst-libs/gst/audio/.libs/libgstaudio-0.10.so /h/goanna/2/os_5.10/cbe/BUILD/SUNWgnome-media-2.20.1/gst-plugins-base-0.10.14/gst-libs/gst/interfaces/.libs/libgstinterfaces-0.10.so ../../gst-libs/gst/cdda/.libs/libgstcdda-0.10.so /h/goanna/2/os_5.10/cbe/BUILD/SUNWgnome-media-2.20.1/gst-plugins-base-0.10.14/gst-libs/gst/tag/.libs/libgsttag-0.10.so ../../gst-libs/gst/rtp/.libs/libgstrtp-0.10.so ../../gst-libs/gst/rtsp/.libs/libgstrtsp-0.10.so ../../gst-libs/gst/sdp/.libs/libgstsdp-0.10.so ../../gst-libs/gst/tag/.libs/libgsttag-0.10.so ../../gst-libs/gst/video/.libs/libgstvideo-0.10.so -lresolv /h/goanna/2/os_5.10/cbe/BUILD/SUNWgnome-media-2.20.1/gstreamer-0.10.14/pkgconfig/../libs/gst/base/.libs/libgstbase-0.10.so /h/goanna/2/os_5.10/cbe/BUILD/SUNWgnome-media-2.20.1/gstreamer-0.10.14/gst/.libs/libgstreamer-0.10.so /h/goanna/2/os_5.10/cbe/BUILD/SUNWgnome-media-2.20.1/gstreamer-0.10.14/pkgconfig/../gst/.libs/libgstreamer-0.10.so -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lpthread -lthread -lrt -lxml2 -lglib-2.0
pkgbuild: ld: warning: file /h/goanna/2/os_5.10/cbe/BUILD/SUNWgnome-media-2.20.1/gst-plugins-base-0.10.14/gst-libs/gst/interfaces/.libs/libgstinterfaces-0.10.so: linked to ../../gst-libs/gst/interfaces/.libs/libgstinterfaces-0.10.so: attempted multiple inclusion of file
pkgbuild: ld: warning: file ../../gst-libs/gst/tag/.libs/libgsttag-0.10.so: linked to /h/goanna/2/os_5.10/cbe/BUILD/SUNWgnome-media-2.20.1/gst-plugins-base-0.10.14/gst-libs/gst/tag/.libs/libgsttag-0.10.so: attempted multiple inclusion of file
pkgbuild: ld: warning: file /h/goanna/2/os_5.10/cbe/BUILD/SUNWgnome-media-2.20.1/gstreamer-0.10.14/pkgconfig/../gst/.libs/libgstreamer-0.10.so: linked to /h/goanna/2/os_5.10/cbe/BUILD/SUNWgnome-media-2.20.1/gstreamer-0.10.14/gst/.libs/libgstreamer-0.10.so: attempted multiple inclusion of file
pkgbuild: creating gst-plugins-base-libs-scan
pkgbuild: gtk-doc: Running scanner gst-plugins-base-libs-scan
pkgbuild:
pkgbuild: ERROR: Caught a segmentation fault while loading plugin file:
pkgbuild: /h/goanna/2/os_5.10/cbe/BUILD/SUNWgnome-media-2.20.1/gst-plugins-base-0.10.14/gst/audioresample/.libs/libgstaudioresample.so
pkgbuild:
pkgbuild: Please either:
pkgbuild: - remove it and restart.
pkgbuild: - run with --gst-disable-segtrap and debug.
pkgbuild: Could not initialize GStreamer: Error re-scanning registry , child terminated by signal
pkgbuild: Scan failed:
pkgbuild: make[3]: *** [scan-build.stamp] Error 1
pkgbuild: make[3]: Leaving directory `/h/goanna/2/os_5.10/cbe/BUILD/SUNWgnome-media-2.20.1/gst-plugins-base-0.10.14/docs/libs'
pkgbuild: make[2]: *** [all-recursive] Error 1
pkgbuild: make[2]: Leaving directory `/h/goanna/2/os_5.10/cbe/BUILD/SUNWgnome-media-2.20.1/gst-plugins-base-0.10.14/docs'
pkgbuild: make[1]: *** [all-recursive] Error 1
pkgbuild: make[1]: Leaving directory `/h/goanna/2/os_5.10/cbe/BUILD/SUNWgnome-media-2.20.1/gst-plugins-base-0.10.14'
pkgbuild: make: *** [all] Error 2
pkgbuild: Bad exit status from /var/tmp/pkgbuild-mwright/pkgbuild-tmp-2.4214 (%build)
--- command output ends --- finished at Mon Oct 29 19:51:17 EST 2007
INFO: pkgbuild -ba finished at Mon Oct 29 19:51:17 EST 2007
ERROR: SUNWgnome-media FAILED
INFO: Check the build log in /h/goanna/2/os_5.10/pkgbuild/build-logs/SUNWgnome-media.log for details
> Though, to be honest, I'm not sure this is a huge deal. Only a few
> GStreamer plugins even use liboil, and you'ld only notice performance
> benefit when using those plugins.
>
> Brian
I tried to fix the assembly, but I couldn't complete that at
the moment due to the Sun Studio 12 compiler bug mentioned
above. So I on my machine I patched the SUNWliboil spec files
and liboil to:
* Patched liboil to disable the inline assembly when compiling with
Sun Studio 12.
* Patched liboil to make the intrinsics compile with Sun Studio 12.
* Compile with Sun Studio 12 on Solaris 10 instead of gcc.
It will only compile %if %arch_sse2, with
/usr/lib/pentium_pro+mmx/pkgconfig/liboil-0.3.pc patched:
# pwd
/usr/lib/pentium_pro+mmx/pkgconfig
# diff -wc liboil-0.3.pc.pentium_pro+mmx.orig liboil-0.3.pc
*** liboil-0.3.pc.pentium_pro+mmx.orig Thu Nov 1 08:29:20 2007
--- liboil-0.3.pc Thu Nov 1 11:31:16 2007
***************
*** 8,14 ****
Name: liboil-0.3
Description: Library of Optimized Inner Loops
Version: 0.3.12
! Libs: -L${libdir} -loil-0.3 -lm
Cflags: -I${includedir}
--- 8,14 ----
Name: liboil-0.3
Description: Library of Optimized Inner Loops
Version: 0.3.12
! Libs: -L${libdir} -R${libdir} -loil-0.3 -lm
Cflags: -I${includedir}
#
and with:
# ln -s /usr/lib/pentium_pro+mmx/pkgconfig/liboil-0.3.pc /usr/lib/pkgconfig/liboil-0.3.pc
#
With those changes, SUNWgnome-media now builds on Solaris 10u4.
I don't know if the liboil intrinsics compiled with Sun Studio 12
work or not, as I have not really tested the JDS applications
that use it. And hence I guess I should assume they are broken.
The liboil make check tests pass though:
...
PASS: stack_align
===================
All 18 tests passed
===================
If anyone else is interested in liboil compiled with Sun Studio 12,
then I have the diffs. I guess since gcc presumably works better
for everyone else, and Sun Studio 12 does not yet handle the
liboil inline assembler, I will proceed by:
- first reporting the Sun Studio 12 compiler bug.
- when that is fixed, maybe if I am not too tied up with other
stuff I could try to finish patching the liboil assembler to
compile with Sun Studio 12.
Thanks, Mark
This message posted from opensolaris.org
More information about the desktop-discuss
mailing list