Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Building DarwinStreamingServer 5.60 with gcc-3.4.5 on 64 bit CentOS 4.3 / AMD 64



Hi

I'm happily running DSS 5.6.0 (from todays CVS checkout) on CentOS 4.3 with Intel P4 and gcc-3.4.5. But on a new server, with dual duo-core AMD64 procs and 64 bits gcc-3.4.5 the DSS is causing me a nightmare.

My story....
When trying to build for the first time, the Buildit script does not support my "uname -m" which is x86_64. Then I alter the case on Linux.i586/i686 to support also Linux.x86_64. Then I add the compiler switch -fPIC and -D_GNU_SOURCES.  This is generally working fine except 3 well-known errors below which are solved with "defined (__linux__)" in the if-statements in the 3 source-files:

Server.tproj/main.cpp: In function `int main(int, char**)':
Server.tproj/main.cpp:226: error: no match for 'operator=' in 'act.sigaction::sa_mask = 0'
/usr/include/bits/sigset.h:29: note: candidates are: __sigset_t& __sigset_t::operator=(const __sigset_t&)
Server.tproj/main.cpp:228: error: invalid conversion from `void (*)(...)' to `void (*)(int)'

PlaylistBroadcaster.cpp: In function `void RegisterEventHandlers()':
PlaylistBroadcaster.cpp:2089: error: no match for 'operator=' in 'act.sigaction::sa_mask = 0'
/usr/include/bits/sigset.h:29: note: candidates are: __sigset_t& __sigset_t::operator=(const __sigset_t&)
PlaylistBroadcaster.cpp :2091: error: invalid conversion from `void (*)(...)' to `void (*)(int)'

BroadcasterMain.cpp: In function `void RegisterEventHandlers()':
BroadcasterMain.cpp:224: error: no match for 'operator=' in ' act.sigaction::sa_mask = 0'
/usr/include/bits/sigset.h:29: note: candidates are: __sigset_t& __sigset_t::operator=(const __sigset_t&)
BroadcasterMain.cpp:226: error: invalid conversion from `void (*)(...)' to `void (*)(int)'


Even if I now am able to compile the DSS, I get a segfault when trying to stream media. I use the same media which is working fine on P4 platform (a 3gp-file streamed to a 3G mobile device), but on the amd64-machine this line is logged in /var/log/messages :
kernel: DarwinStreaming[5240]: segfault at 0000000000000008 rip 000000000041eeea rsp 00000000414001c0 error 4

I believe this is related to an alignment problem between pointers and datatype "int". In a 64 bit environment all pointers are 64 bit of length, so it's not possible to cast or store int's in pointers....

My trials are based upon some other attemts :
http://streaming411.com/wiki/index.php?title=Darwin_Streaming_Server
http://lists.apple.com/archives/streaming-server-dev/2006/Mar/msg00034.html
http://lists.apple.com/archives/streaming-server-users/2006/May//msg00222.html
http://lists.apple.com/archives/streaming-server-dev/2006/May/msg00049.html
http://lists.apple.com/archives/streaming-server-users/2006/May/msg00256.html

The basic question is:
Is there anybody out there which have been able to build and run DSS 5.6.0 on Linux/amd64 without segmentation faults?

PS: When the DarwinStreamingServer is up running, and I connect to the streamingadminserver.pl from my Browser, I can see that the Date/Time printed in main window is clearly showing the problem with alignments and int-to-pointer. The date/time given is obviously calculated from the 32 bit upper part of a pointer, which would in the case of a cast from int, be just a lot of zeroes since the 32 bit int is situated in lower 32 bit part of a pointer :
Status: Started Sun, 0. Jan 1900 00:00:13732752
Current Time On Server: Sun, 0. Jan 1900 00:00:13733280


Any hints or input would be appreciated!

Sverre
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Streaming-server-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/streaming-server-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.