473,396 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Compile Error

I am on a Solaris 10 6/06 SPARC machine. I tried to compile sound player
app for Asterisk and got the following error:

Can someone provide an explanation or work around? Thanks!

xxdev2:12:24:/opt/sft/voip/asterisk-addons-1.2.5/format_mp3gmake
gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6
-I/usr/include/ -I/u01/app/oracle/product/primary/rdbms/public/
-I/usr/local/include -I/usr/local/openldap/include
-I/usr/local/BerkeleyDB.4.4/include -I/usr/local/ssl/include
-I/usr/local/imap-2006a/include -I/usr/local/pgsql/include
-I/usr/local/mysql/include/mysql/include -I/opt/asterisk/usr/include -c
-o format_mp3.o format_mp3.c
In file included from /opt/asterisk/usr/include/asterisk/channel.h:109,
from format_mp3.c:21:
/opt/asterisk/usr/include/asterisk/frame.h:289: error: syntax error
before 'u_int16_t'
/opt/asterisk/usr/include/asterisk/frame.h:289: warning: no semicolon at
end of struct or union
/opt/asterisk/usr/include/asterisk/frame.h:299: warning: type defaults
to 'int' in declaration of 'data'
/opt/asterisk/usr/include/asterisk/frame.h:299: warning: data definition
has no type or storage class
/opt/asterisk/usr/include/asterisk/frame.h:300: error: syntax error
before '}' token
In file included from format_mp3.c:21:
/opt/asterisk/usr/include/asterisk/channel.h: In function 'ast_select':
/opt/asterisk/usr/include/asterisk/channel.h:1159: warning: implicit
declaration of function 'timersub'
gmake: *** [format_mp3.o] Error 1
Offending lines of code:

struct ast_option_header {
/* Always keep in network byte order */
#if __BYTE_ORDER == __BIG_ENDIAN
u_int16_t flag:3;
u_int16_t option:13;
#else
#if __BYTE_ORDER == __LITTLE_ENDIAN
u_int16_t option:13;
u_int16_t flag:3;
#else
#error Byte order not defined
#endif
#endif
u_int8_t data[0];
}; //line 300 frame.h

GCC version:

xxdev2:12:24:/opt/sft/voip/asterisk-addons-1.2.5/format_mp3gcc -v
Using built-in specs.
Target: sparc-sun-solaris2.10
Configured with:
/net/tibia/export/bldmstr/nightly/20060817_mars_gcc.s10.opt.tarbuild/src/configure
--prefix=/opt/gcc --enable-shared --with-system-zlib
--enable-checking=release --disable-libmudflap --enable-languages=c,c++
--enable-version-specific-runtime-libs
--with-gxx-include-dir=/opt/gcc/include/c++/4.0.3 --with-cpu=v9
Thread model: posix
gcc version 4.0.3 (gccfss)
Dec 13 '06 #1
3 3259
Did you include stdint.h?

Dec 13 '06 #2


On Wed, 13 Dec 2006, Mikail Dellovich wrote:
I am on a Solaris 10 6/06 SPARC machine. I tried to compile sound player app
for Asterisk and got the following error:

Can someone provide an explanation or work around? Thanks!

xxdev2:12:24:/opt/sft/voip/asterisk-addons-1.2.5/format_mp3gmake
gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -I/usr/include/
-I/u01/app/oracle/product/primary/rdbms/public/ -I/usr/local/include
-I/usr/local/openldap/include -I/usr/local/BerkeleyDB.4.4/include
-I/usr/local/ssl/include -I/usr/local/imap-2006a/include
-I/usr/local/pgsql/include -I/usr/local/mysql/include/mysql/include
-I/opt/asterisk/usr/include -c -o format_mp3.o format_mp3.c
In file included from /opt/asterisk/usr/include/asterisk/channel.h:109,
from format_mp3.c:21:
/opt/asterisk/usr/include/asterisk/frame.h:289: error: syntax error before
'u_int16_t'
/opt/asterisk/usr/include/asterisk/frame.h:289: warning: no semicolon at end
of struct or union
/opt/asterisk/usr/include/asterisk/frame.h:299: warning: type defaults to
'int' in declaration of 'data'
/opt/asterisk/usr/include/asterisk/frame.h:299: warning: data definition has
no type or storage class
/opt/asterisk/usr/include/asterisk/frame.h:300: error: syntax error before
'}' token
In file included from format_mp3.c:21:
/opt/asterisk/usr/include/asterisk/channel.h: In function 'ast_select':
/opt/asterisk/usr/include/asterisk/channel.h:1159: warning: implicit
declaration of function 'timersub'
gmake: *** [format_mp3.o] Error 1
Offending lines of code:

struct ast_option_header {
/* Always keep in network byte order */
#if __BYTE_ORDER == __BIG_ENDIAN
u_int16_t flag:3;
u_int16_t option:13;
#else
#if __BYTE_ORDER == __LITTLE_ENDIAN
u_int16_t option:13;
u_int16_t flag:3;
#else
#error Byte order not defined
#endif
#endif
u_int8_t data[0];
}; //line 300 frame.h
<snip>

I suppose the problem is that the compiler could not find a definition of
the u_int16_t type. A workaround would be to add an appropriate definition
of u_int16_t before the usage. As far as I know, Solaris defines the
uint16_t type (notice the missing underscore between after 'u'). So adding
the following lines before the definition of struct ast_option_header
might help:

#include <stdint.h>

typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;

You should bracket the definitions with a platform-specific
#ifdef / #endif

Posting to a Solaris specific programming group might help as well.

Emil

Dec 13 '06 #3
dc*****@connx.com writes:
Did you include stdint.h?
stdint.h will not (should not) help with u_int16_t, because
that's not a standard name. I bet you're thinking of uint16_t.
--
"Given that computing power increases exponentially with time,
algorithms with exponential or better O-notations
are actually linear with a large constant."
--Mike Lee
Dec 13 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Danny Boelens | last post by:
Hi all, today I ran into a compile error after a compiler upgrade. I made a small example to demonstrate my compile error: template<typename T1, typename T2> class A {}; class B
5
by: Carmine Cairo | last post by:
Hi, I'm working on a project and today I've note a little problem during the compile fase. Here a little piece of code: // 1st version welldone = 0; size = p->getSize(); backbone = new...
5
by: Brice Prunier | last post by:
Here under 4 schemas i'm working with ( it may be long: sorry...) The context is the following : Resident.xsd imports Person.xsd and includes Common.xsd ( anonimous schema: no TargetNamespace )...
10
by: Chris LaJoie | last post by:
Our company has been developing a program in C# for some time now, and we haven't had any problems with it, but just last night something cropped up that has me, and everyone else, stumped. I...
6
by: Thomas Connolly | last post by:
I have 2 pages referencing the same codebehind file in my project. Originally the pages referenced separate code behind files. Once I changed the reference to the same file, everything worked...
0
by: Jim Heavey | last post by:
Internal Compiler Error: stage 'BEGIN' Hello, I had an application which was working just fine and I decided to modify all database access within the application to utilizie a new Namespace that I...
9
by: ThunderMusic | last post by:
Hi, I'd like to create a compile time error in my class... maybe there's a way already built in in the framework so I can achieve what I want... I have 2 constructors in my class. One of them...
4
by: tony | last post by:
Hello! My question is about calling this method CollectData below but I get a compile error that I shouldn't have because the type parameter is correct. The compile error is the following:...
5
by: wong_powah | last post by:
#include <vector> #include <iostream> using std::cout; using std::vector; enum {DATASIZE = 20}; typedef unsigned char data_t;
2
by: BruceWho | last post by:
I downloaded boost1.35.0 and built it with following command: bjam --toolset=msvc-7.1 --variant=release --threading=multi -- link=shared --with-system stage and it failed to compile, error...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.