Last Comment Bug 499266 - AIX support for media/libsydneyaudio
: AIX support for media/libsydneyaudio
Status: RESOLVED FIXED
: verified1.9.1, verified1.9.2
Product: Core
Classification: Components
Component: Audio/Video (show other bugs)
: 1.9.1 Branch
: PowerPC AIX
: -- normal (vote)
: ---
Assigned To: Uli Link (:ul-mcamafia)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-19 00:57 PDT by Shailen
Modified: 2010-06-25 15:07 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
.7-fixed
.11-fixed


Attachments
Patch V 1 (661 bytes, patch)
2009-06-19 01:16 PDT, Shailen
no flags Details | Diff | Splinter Review
Adds correct endian for AIX (769 bytes, patch)
2009-10-23 03:42 PDT, Uli Link (:ul-mcamafia)
roc: review+
Details | Diff | Splinter Review
Makefile changes (2.49 KB, patch)
2009-10-27 23:15 PDT, Shailen
no flags Details | Diff | Splinter Review
source file for aix (14.89 KB, text/x-csrc)
2009-10-27 23:16 PDT, Shailen
cajbir.bugzilla: review-
Details
Changes to README_MOZILLA and update.sh (1.14 KB, patch)
2009-12-18 23:58 PST, Shailen
no flags Details | Diff | Splinter Review
.patch file (726 bytes, patch)
2009-12-18 23:59 PST, Shailen
no flags Details | Diff | Splinter Review
adds support for AIX5 (18.17 KB, patch)
2010-04-07 12:39 PDT, Uli Link (:ul-mcamafia)
no flags Details | Diff | Splinter Review
patch adjusted for Mozilla 1.9.1 branch (18.16 KB, patch)
2010-04-07 13:08 PDT, Uli Link (:ul-mcamafia)
no flags Details | Diff | Splinter Review
Patch for trunk recreated to comment# 16 (34.45 KB, patch)
2010-04-12 01:48 PDT, Uli Link (:ul-mcamafia)
kinetik: review+
Details | Diff | Splinter Review
Patch for moz191 branch, revised to comment# 16 (34.39 KB, patch)
2010-04-12 01:50 PDT, Uli Link (:ul-mcamafia)
kinetik: review+
dveditz: approval1.9.1.11+
Details | Diff | Splinter Review
Patch for moz192 branch, revised to comment# 16 (34.47 KB, patch)
2010-04-12 02:27 PDT, Uli Link (:ul-mcamafia)
kinetik: review+
dveditz: approval1.9.2.7+
Details | Diff | Splinter Review

Description Shailen 2009-06-19 00:57:09 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11

While compiling content/media/video/src/nsAudioStream.cpp on AIX, getting below compilation error -

../../../../dist/include/sydneyaudio/sydney_audio.h", line 89.6: 1540-0859 (S) #error directive: "Cannot determine byte orde
r!".
gmake[7]: *** [nsAudioStream.o] Error 1
gmake[7]: Leaving directory `/home/guest/sb/mercurial/mozilla/obj-opt/content/media/video/src'
gmake[6]: *** [src_libs] Error 2
gmake[6]: Leaving directory `/home/guest/sb/mercurial/mozilla/obj-opt/content/media/video'
gmake[5]: *** [libs] Error 2
gmake[5]: Leaving directory `/home/guest/sb/mercurial/mozilla/obj-opt/content/media'
gmake[4]: *** [media_libs] Error 2
gmake[4]: Leaving directory `/home/guest/sb/mercurial/mozilla/obj-opt/content'
gmake[3]: *** [libs_tier_gecko] Error 2
gmake[3]: Leaving directory `/home/guest/sb/mercurial/mozilla/obj-opt'
gmake[2]: *** [tier_gecko] Error 2
gmake[2]: Leaving directory `/home/guest/sb/mercurial/mozilla/obj-opt'
gmake[1]: *** [default] Error 2
gmake[1]: Leaving directory `/home/guest/sb/mercurial/mozilla/obj-opt'
gmake: *** [build] Error 2




Reproducible: Always

Steps to Reproduce:
1. Build Mozilla Firefox 3.6a1pre build on AIX with Gnome RPMS of 64 bit
version.
2.
3.
Actual Results:  
Build fails with the above error.


Expected Results:  
No build failure
Comment 1 Shailen 2009-06-19 01:16:24 PDT
Created attachment 384066 [details] [diff] [review]
Patch V 1

After applying this patch, the compilation goes ahead but fails in mozilla/obj-opt/layout/build with the below linker error.

ld: 0711-317 ERROR: Undefined symbol: .sa_stream_destroy
ld: 0711-317 ERROR: Undefined symbol: .sa_stream_create_pcm
ld: 0711-317 ERROR: Undefined symbol: .sa_stream_open
ld: 0711-317 ERROR: Undefined symbol: .sa_stream_write
ld: 0711-317 ERROR: Undefined symbol: .sa_stream_get_write_size
ld: 0711-317 ERROR: Undefined symbol: .sa_stream_drain
ld: 0711-317 ERROR: Undefined symbol: .sa_stream_pause
ld: 0711-317 ERROR: Undefined symbol: .sa_stream_resume
ld: 0711-317 ERROR: Undefined symbol: .sa_stream_get_position
ld: 0711-317 ERROR: Undefined symbol: .alloca
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
gmake[1]: *** [libgklayout.so] Error 8
gmake[1]: Leaving directory `/home/guest/sb/mercurial/mozilla/obj-opt/layout/build'

Also when I looked at the directory mozilla/media/libsydneyaudio/src, I do not see any corresponding aix version of audio files.
Comment 2 Robert O'Callahan (:roc) (email my personal email if necessary) 2009-06-21 23:04:51 PDT
I think you'll need to do more work here to create a libsydneyaudio implementation for AIX.
Comment 3 Uli Link (:ul-mcamafia) 2009-10-23 03:42:52 PDT
Created attachment 407971 [details] [diff] [review]
Adds correct endian for AIX

Added BIG_ENDIAN for AIX
Comment 4 Uli Link (:ul-mcamafia) 2009-10-23 05:45:49 PDT
(In reply to comment #1)
> Created an attachment (id=384066) [details]
> Patch V 1
> 
> After applying this patch, the compilation goes ahead but fails in
> mozilla/obj-opt/layout/build with the below linker error.

Detailed "ld -bnoquiet" output for tracking down from where the missing symbols come from:

ld: 0711-318 ERROR: Undefined symbols were found.
	The following symbols are in error:
 Symbol                    Inpndx  TY CL Source-File(Object-File) OR Import-File{Shared-object}
                              RLD: Address  Section  Rld-type Referencing Symbol
 ----------------------------------------------------------------------------------------------
 .sa_stream_destroy        [128]   ER PR /home/ulink/Src/comm-central/mozilla/content/media/video/src/nsAudioStream.cpp(../../content/media/video/src/libgkconvideo_s.a[nsAudioStream.o])
                                   00000174 .text    R_RBR    [22]    .nsAudioStream::Shutdown()
                                   000002f0 .text    R_RBR    [26]    .nsAudioStream::Init(int,int,nsAudioStream::SampleFormat)
 .sa_stream_create_pcm     [134]   ER PR /home/ulink/Src/comm-central/mozilla/content/media/video/src/nsAudioStream.cpp(../../content/media/video/src/libgkconvideo_s.a[nsAudioStream.o])
                                   000002bc .text    R_RBR    [26]    .nsAudioStream::Init(int,int,nsAudioStream::SampleFormat)
 .sa_stream_open           [136]   ER PR /home/ulink/Src/comm-central/mozilla/content/media/video/src/nsAudioStream.cpp(../../content/media/video/src/libgkconvideo_s.a[nsAudioStream.o])
                                   000002dc .text    R_RBR    [26]    .nsAudioStream::Init(int,int,nsAudioStream::SampleFormat)
 .sa_stream_write          [150]   ER PR /home/ulink/Src/comm-central/mozilla/content/media/video/src/nsAudioStream.cpp(../../content/media/video/src/libgkconvideo_s.a[nsAudioStream.o])
                                   00000638 .text    R_RBR    [28]    .nsAudioStream::Write(const void*,unsigned int)
                                   000007b0 .text    R_RBR    [36]    .nsAudioStream::Drain()
 .sa_stream_get_write_size [156]   ER PR /home/ulink/Src/comm-central/mozilla/content/media/video/src/nsAudioStream.cpp(../../content/media/video/src/libgkconvideo_s.a[nsAudioStream.o])
                                   00000718 .text    R_RBR    [32]    .nsAudioStream::Available()
 .sa_stream_drain          [158]   ER PR /home/ulink/Src/comm-central/mozilla/content/media/video/src/nsAudioStream.cpp(../../content/media/video/src/libgkconvideo_s.a[nsAudioStream.o])
                                   000007c4 .text    R_RBR    [36]    .nsAudioStream::Drain()
 .sa_stream_pause          [160]   ER PR /home/ulink/Src/comm-central/mozilla/content/media/video/src/nsAudioStream.cpp(../../content/media/video/src/libgkconvideo_s.a[nsAudioStream.o])
                                   00000824 .text    R_RBR    [38]    .nsAudioStream::Pause()
 .sa_stream_resume         [162]   ER PR /home/ulink/Src/comm-central/mozilla/content/media/video/src/nsAudioStream.cpp(../../content/media/video/src/libgkconvideo_s.a[nsAudioStream.o])
                                   0000086c .text    R_RBR    [40]    .nsAudioStream::Resume()
 .sa_stream_get_position   [164]   ER PR /home/ulink/Src/comm-central/mozilla/content/media/video/src/nsAudioStream.cpp(../../content/media/video/src/libgkconvideo_s.a[nsAudioStream.o])
                                   000008e8 .text    R_RBR    [42]    .nsAudioStream::GetPosition()
 .debug_printf             [82]    ER PR /home/ulink/Src/comm-central/mozilla/media/libfishsound/src/libfishsound/fishsound_vorbis.c(../../media/libfishsound/src/libfishsound/libfishsound.a[fishsound_vorbis.o])
                                   00000260 .text    R_RBR    [18]    <.fs_vorbis_decode>
                                   000006f8 .text    R_RBR    [26]    <.fish_sound_vorbis_identify_10_9>
 .debug_printf             [156]   ER PR /home/ulink/Src/comm-central/mozilla/media/libfishsound/src/libfishsound/fishsound_comments.c(../../media/libfishsound/src/libfishsound/libfishsound.a[fishsound_comments.o])
                                   0000075c .text    R_RBR    [50]    .fish_sound_comments_encode
                                   00000a78 .text    R_RBR    [52]    .fish_sound_comments_decode
                                   00000ad8 .text    R_RBR    [52]    .fish_sound_comments_decode
                                   00000b38 .text    R_RBR    [52]    .fish_sound_comments_decode
                                   00000b80 .text    R_RBR    [52]    .fish_sound_comments_decode
                                   00000c04 .text    R_RBR    [52]    .fish_sound_comments_decode
                                   00000d70 .text    R_RBR    [58]    <.fs_comment_validate_byname_24_12>
 .alloca                   [64]    ER PR /home/ulink/Src/comm-central/mozilla/media/libvorbis/lib/vorbis_mapping0.c(../../media/libvorbis/lib/libvorbis.a[vorbis_mapping0.o])
                                   00000044 .text    R_RBR    [12]    <.mapping0_inverse>
                                   00000058 .text    R_RBR    [12]    <.mapping0_inverse>
                                   0000006c .text    R_RBR    [12]    <.mapping0_inverse>
                                   00000080 .text    R_RBR    [12]    <.mapping0_inverse>
                                   00000508 .text    R_RBR    [14]    <.mapping0_forward>
                                   00000568 .text    R_RBR    [14]    <.mapping0_forward>
                                   00001134 .text    R_RBR    [14]    <.mapping0_forward>
                                   00001148 .text    R_RBR    [14]    <.mapping0_forward>
                                   0000115c .text    R_RBR    [14]    <.mapping0_forward>
                                   00001170 .text    R_RBR    [14]    <.mapping0_forward>
                                   00001254 .text    R_RBR    [14]    <.mapping0_forward>
 .alloca                   [176]   ER PR /home/ulink/Src/comm-central/mozilla/media/libvorbis/lib/vorbis_info.c(../../media/libvorbis/lib/libvorbis.a[vorbis_info.o])
                                   00000dd0 .text    R_RBR    [46]    .vorbis_comment_query_count
                                   00000eb4 .text    R_RBR    [48]    .vorbis_comment_query
                                   00000fc4 .text    R_RBR    [50]    .vorbis_comment_add_tag
 .alloca                   [142]   ER PR /home/ulink/Src/comm-central/mozilla/media/libvorbis/lib/vorbis_res0.c(../../media/libvorbis/lib/libvorbis.a[vorbis_res0.o])
                                   0000096c .text    R_RBR    [26]    <._01inverse>
 .alloca                   [116]   ER PR /home/ulink/Src/comm-central/mozilla/media/libvorbis/lib/vorbis_codebook.c(../../media/libvorbis/lib/libvorbis.a[vorbis_codebook.o])
                                   00001078 .text    R_RBR    [42]    <.vorbis_book_decodevs_add_19_9>
                                   00001088 .text    R_RBR    [42]    <.vorbisld: 0711-317 ERROR: Undefined symbol: .sa_stream_destroy
ld: 0711-317 ERROR: Undefined symbol: .sa_stream_create_pcm
ld: 0711-317 ERROR: Undefined symbol: .sa_stream_open
ld: 0711-317 ERROR: Undefined symbol: .sa_stream_write
ld: 0711-317 ERROR: Undefined symbol: .sa_stream_get_write_size
ld: 0711-317 ERROR: Undefined symbol: .sa_stream_drain
ld: 0711-317 ERROR: Undefined symbol: .sa_stream_pause
ld: 0711-317 ERROR: Undefined symbol: .sa_stream_resume
ld: 0711-317 ERROR: Undefined symbol: .sa_stream_get_position
ld: 0711-317 ERROR: Undefined symbol: .debug_printf
ld: 0711-317 ERROR: Undefined symbol: .alloca
_book_decodevs_add_19_9>
 .alloca                   [138]   ER PR /home/ulink/Src/comm-central/mozilla/media/libvorbis/lib/vorbis_sharedbook.c(../../media/libvorbis/lib/libvorbis.a[vorbis_sharedbook.o])
                                   000014c4 .text    R_RBR    [38]    .vorbis_book_init_decode
                                   00001524 .text    R_RBR    [38]    .vorbis_book_init_decode
 .alloca                   [42]    ER PR /home/ulink/Src/comm-central/mozilla/media/libvorbis/lib/vorbis_lsp.c(../../media/libvorbis/lib/libvorbis.a[vorbis_lsp.o])
                                   00000020 .text    R_RBR    [12]    <.Newton_Raphson>
                                   000001d4 .text    R_RBR    [14]    <.Laguerre_With_Deflation>
                                   00000908 .text    R_RBR    [22]    .vorbis_lpc_to_lsp
                                   00000918 .text    R_RBR    [22]    .vorbis_lpc_to_lsp
                                   00000928 .text    R_RBR    [22]    .vorbis_lpc_to_lsp
                                   00000938 .text    R_RBR    [22]    .vorbis_lpc_to_lsp
 .alloca                   [164]   ER PR /home/ulink/Src/comm-central/mozilla/media/libvorbis/lib/vorbis_psy.c(../../media/libvorbis/lib/libvorbis.a[vorbis_psy.o])
                                   00000394 .text    R_RBR    [22]    <.bark_noise_hybridmp>
                                   000003a4 .text    R_RBR    [22]    <.bark_noise_hybridmp>
                                   000003b4 .text    R_RBR    [22]    <.bark_noise_hybridmp>
                                   000003c4 .text    R_RBR    [22]    <.bark_noise_hybridmp>
                                   000003d4 .text    R_RBR    [22]    <.bark_noise_hybridmp>
                                   00000ce0 .text    R_RBR    [26]    <.seed_chase>
                                   00000cf0 .text    R_RBR    [26]    <.seed_chase>
                                   00001200 .text    R_RBR    [32]    <.setup_tone_curves>
                                   00002edc .text    R_RBR    [50]    ._vp_noise_normalize_sort
                                   00003b8c .text    R_RBR    [62]    ._vp_tonemask
                                   00003ca8 .text    R_RBR    [64]    ._vp_noisemask
                                   00004a14 .text    R_RBR    [78]    <._vp_quantize_couple_sort_37_22>
 .alloca                   [56]    ER PR /home/ulink/Src/comm-central/mozilla/media/libvorbis/lib/vorbis_mdct.c(../../media/libvorbis/lib/libvorbis.a[vorbis_mdct.o])
                                   00001154 .text    R_RBR    [28]    .mdct_forward
 .alloca                   [50]    ER PR /home/ulink/Src/comm-central/mozilla/media/libvorbis/lib/vorbis_envelope.c(../../media/libvorbis/lib/libvorbis.a[vorbis_envelope.o])
                                   00000054 .text    R_RBR    [12]    <._ve_amp>
 .alloca                   [30]    ER PR /home/ulink/Src/comm-central/mozilla/media/libvorbis/lib/vorbis_lpc.c(../../media/libvorbis/lib/libvorbis.a[vorbis_lpc.o])
                                   0000002c .text    R_RBR    [12]    .vorbis_lpc_predict
                                   00000184 .text    R_RBR    [14]    .vorbis_lpc_from_data
                                   00000194 .text    R_RBR    [14]    .vorbis_lpc_from_data
 .alloca                   [142]   ER PR /home/ulink/Src/comm-central/mozilla/media/libvorbis/lib/vorbis_block.c(../../media/libvorbis/lib/libvorbis.a[vorbis_block.o])
                                   00000058 .text    R_RBR    [14]    <._preextrapolate_helper>
                                   0000006c .text    R_RBR    [14]    <._preextrapolate_helper>
                                   00000be4 .text    R_RBR    [38]    .vorbis_analysis_wrote
ER: The return code is 8.
gmake[2]: *** [libgklayout.so] Error 8
Comment 5 Uli Link (:ul-mcamafia) 2009-10-27 13:44:39 PDT
Resolving the missing symbols:

1.) missing ".alloca" :
add to media/libvorbis/lib/Makefile.in

ifeq ($(OS_ARCH),AIX)
MODULE_OPTIMIZE_FLAGS += -qalloca -O2 -qarch=com -qalign=full -qmaxmem=-1
endif

2.) missing ".sa_stream_* "
add a file sydney_audio_aixaudio.c to media/libsydneyaudio/src
with all missing functions to the UNSUPPORTED functions
and 

ifeq ($(OS_ARCH),AIX)
CSRCS           = \
                sydney_audio_aixaudio.c \
                $(NULL)
endif

to Makefile.in

libxul.so linked successfully

Patch will follow soon.
Comment 6 Shailen 2009-10-27 23:15:51 PDT
Created attachment 408791 [details] [diff] [review]
Makefile changes
Comment 7 Shailen 2009-10-27 23:16:43 PDT
Created attachment 408792 [details]
source file for aix
Comment 8 Shailen 2009-10-27 23:18:38 PDT
ULi :

  I have attached the source file changes, please feel free to make changes to the attachments.
Comment 9 Shailen 2009-12-18 23:58:12 PST
Created attachment 418484 [details] [diff] [review]
Changes to README_MOZILLA and update.sh
Comment 10 Shailen 2009-12-18 23:59:36 PST
Created attachment 418485 [details] [diff] [review]
.patch file
Comment 11 cajbir (:cajbir) 2010-01-25 18:32:54 PST
Comment on attachment 408792 [details]
source file for aix

Was asking for a review on this a mistake? I only review patches, not C source files.
Comment 12 cajbir (:cajbir) 2010-01-25 18:34:05 PST
Comment on attachment 418484 [details] [diff] [review]
Changes to README_MOZILLA and update.sh

Changed reviewer to Matthew Gregan - he's the maintainer for libsydneyaudio and will be able to advise better.
Comment 13 Uli Link (:ul-mcamafia) 2010-01-26 00:54:45 PST
https://bugzilla.mozilla.org/attachment.cgi?id=418484

Should read instead

>...
>#ifndef DEFAULT_AUDIO_DEVICE
>#define DEFAULT_AUDIO_DEVICE "/dev/baud0/1"
>#endif


#ifndef DEFAULT_AUDIO_DEVICE
#define DEFAULT_AUDIO_DEVICE "/dev/paud0/1"
#endif

/dev/baud0 is the long obsolete device name for the Microchannel architecture RS/6000 boxes. Last supported with AIX 4.3.3.
On AIX 5.1 and later only /dev/paud0 soundcard is supported
Comment 14 Uli Link (:ul-mcamafia) 2010-04-07 12:39:18 PDT
Created attachment 437636 [details] [diff] [review]
adds support for AIX5

The patch added here was used for building SeaMonkey 2.0.2, 2.0.3 and 2.0.4 releases.
Comment 15 Uli Link (:ul-mcamafia) 2010-04-07 13:08:07 PDT
Created attachment 437640 [details] [diff] [review]
patch adjusted for Mozilla 1.9.1 branch
Comment 16 Matthew Gregan [:kinetik] 2010-04-11 16:01:27 PDT
As well as including the changes as a patch file (and listing them in update.sh) you need to apply the patch so the file is created--this is not done during the build process.  The applied version is what will be build.  The separate patch files are just to make tracking the changes against upstream easier.

If you can fix that up, I'll r+ the result.  I can't test this, so I'll have to trust that it works.
Comment 17 Matthew Gregan [:kinetik] 2010-04-11 16:02:50 PDT
Comment on attachment 437640 [details] [diff] [review]
patch adjusted for Mozilla 1.9.1 branch

Please rerequest review from me once fixed up.  Thanks!
Comment 18 Uli Link (:ul-mcamafia) 2010-04-12 01:48:58 PDT
Created attachment 438441 [details] [diff] [review]
Patch for trunk recreated to comment# 16 

Recreated the patch in applied state and context adjustmend in src/Makefile.in
Comment 19 Uli Link (:ul-mcamafia) 2010-04-12 01:50:46 PDT
Created attachment 438442 [details] [diff] [review]
Patch for moz191 branch, revised to comment# 16

Same patch with several offset adjustments, for mozilla-1.9.1 branch.
Comment 20 Uli Link (:ul-mcamafia) 2010-04-12 02:27:41 PDT
Created attachment 438445 [details] [diff] [review]
Patch for moz192 branch, revised to comment# 16
Comment 21 Matthew Gregan [:kinetik] 2010-04-12 04:13:10 PDT
Comment on attachment 438445 [details] [diff] [review]
Patch for moz192 branch, revised to comment# 16

Thanks!
Comment 22 Robert O'Callahan (:roc) (email my personal email if necessary) 2010-04-22 22:38:15 PDT
http://hg.mozilla.org/mozilla-central/rev/c65d0447da26
Comment 23 Uli Link (:ul-mcamafia) 2010-04-23 04:10:03 PDT
Comment on attachment 438442 [details] [diff] [review]
Patch for moz191 branch, revised to comment# 16

The patch is included in contributed builds of SeaMonkey 2.0.x since quite a while. 
No changes for any platform except AIX.
Comment 24 Uli Link (:ul-mcamafia) 2010-04-23 04:11:33 PDT
Comment on attachment 438445 [details] [diff] [review]
Patch for moz192 branch, revised to comment# 16

Does not change compiled code for anything but AIX.
Comment 25 Daniel Veditz [:dveditz] 2010-06-14 10:38:15 PDT
Comment on attachment 438442 [details] [diff] [review]
Patch for moz191 branch, revised to comment# 16

Approved for 1.9.1.11, a=dveditz for release-drivers
Comment 26 Daniel Veditz [:dveditz] 2010-06-14 10:38:36 PDT
Comment on attachment 438445 [details] [diff] [review]
Patch for moz192 branch, revised to comment# 16

Approved for 1.9.2.6, a=dveditz for release-drivers
Comment 27 Marco Bonardo [::mak] 2010-06-21 15:53:52 PDT
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/b4bc6d27b9db

Note You need to log in before you can comment on or make changes to this bug.