No subject
Thu Jul 12 09:23:04 CDT 2007
target CFLAGS in the COPTS variable. I tweaked the Makefile in 1.4 and trunk to
add the contents of COPTS to CFLAGS. This should fix it.
> 2. I couldn't get the build to go at all until I added this code to the
> bottom of the files ~/utils/extconf.c and ~utils/check_expr.c:
>
> AST_MUTEX_DEFINE_STATIC(fetchadd_m); /* used for all fetc&add ops */
> int ast_atomic_fetchadd_int_slow(volatile int *p, int v)
> {
> int ret;
> ast_mutex_lock(&fetchadd_m);
> ret = *p;
> *p += v;
> ast_mutex_unlock(&fetchadd_m);
> return ret;
> }
I assume you're building with LOW_MEMORY defined?
This should be fixed in trunk rev 80262. I didn't make the change in 1.4
because I wasn't sure the problem existed there or not. If you find that it is,
I'll backport it.
> I suspect that the object code for this function hasn't been compiled
> yet at the time that the build process enters ~/utils. I cut and pasted
> it from somewhere else in the code--I'm too bleary-eyed now to remember
> where--and things built just fine.
>
> Also, what's up with the identical source code for ast_expr2.c, being
> compiled twice in the build (in ~/utils and ~/main)? I'm sure there
> must be a reason, and I hope it's not cheeky of me to ask why. DRY and all.
I ... don't remember why. I think it's because it is compiled with different
options depending on whether it is being included in the main Asterisk binary
(main/) or in an external utility (utils/).
> 3. Speaking of ast_expr2.c, I still suffer from the openWRT build
> choking on some math functions, namely REMAINDER ROUND and TRUNC. That
> is beyond the problem I reported before, which is the definition of
> __USE_ISOC99, which causes the 'l' versions of all these functions to be
> selected instead of the vanilla ones. The comment in the source code at
> the point of the #ifdef on this value (from murph) is not very reassuring.
This issue isn't an obvious one to me, so you'll have to put it on the bug
tracker to ensure that it gets followed up on.
You said you got it to build. What did you change?
--
Russell Bryant
Software Engineer
Digium, Inc.
More information about the asterisk-dev
mailing list