473,546 Members | 2,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_head er {
/* 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_g cc.s10.opt.tarb uild/src/configure
--prefix=/opt/gcc --enable-shared --with-system-zlib
--enable-checking=releas e --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 3282
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_head er {
/* 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_head er
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.c om 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
2218
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
3307
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 rightType;
5
3798
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 ) Person.xsd includes Common-Naming.xsd ( anonimous schemas ) Common-Naming.xsd includes common.xsd ( both are anonimous schemas ) Compilation of...
10
19695
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 have a struct that contains several different types of data. This struct is used throuout the program. Now, when I compile, I get 6 errors, all of...
6
2840
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 fine while the file was in the project directory. When the obsolete file was removed from the project directory, my application will no longer...
0
1887
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 had developed which would handle all database access. After I modified all of the code to point to the new namespace and created all of the...
9
3496
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 has mandatory parameters, I mean, they should not be null nor empty (for strings). So I'd make the validation in the constructor and generate a...
4
1832
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: C:\PK\Development\Products\UTCAS\4.0\SRC\MeltPracApplication\Dialog\Composit ionForm.cs(942): Argument '1': cannot convert from 'ref...
5
5025
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
4125
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 message is: E:\software\development\boost_1_35_0\boost_1_35_0>bjam -- toolset=msvc-7.1 --variant=release --threading=multi --link=shared --
0
7504
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7435
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7694
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7947
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7461
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6026
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.