Is _environ present in 7.0-RELEASE ?

Ashish Shukla wahjava.ml at gmail.com
Mon Aug 11 10:06:59 UTC 2008


Hi all,

I'm running FreeBSD 7.0-RELEASE-p3 (amd64). I'm trying to install kde4 from scratch. I'm getting an error with building libxine-1.1.14. And as kde4 ports depends on libxine, 
I'm not able to build kde4. Following is an excerpt from the build output, I've received:

---->8---->8----
Making all in libreal
gmake[2]: Entering directory `/usr/ports/multimedia/libxine/work/xine-lib-1.1.14/src/libreal'
/bin/sh ../../libtool --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I. -I../../include -I../.. -I../../include -I../../include -I../../src -I../../src/xine-engine -
I../../src/xine-engine -I../../src/xine-utils  -I../../src/input -I../../src/input  -I../../lib -I../../lib  -I/usr/local/include -fvisibility=hidden -D_REENTRANT -
D_FILE_OFFSET_BITS=64 -DXINE_COMPILE   -Wformat=2 -Wno-format-zero-length -Wmissing-format-attribute -Werror-implicit-function-declaration -Wstrict-aliasing=2 -Wall -
Wpointer-arith -Wnested-externs -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -pipe -msse -msse2 -msse3 -mmmx -march=nocona -march=nocona -g -
fno-force-addr -I/usr/local/include -I/usr/local/include/dvdread -DNDEBUG -MT xineplug_decode_real_la-xine_real_video_decoder.lo -MD -MP -MF .deps/xineplug_decode_real_la-
xine_real_video_decoder.Tpo -c -o xineplug_decode_real_la-xine_real_video_decoder.lo `test -f 'xine_real_video_decoder.c' || echo './'`xine_real_video_decoder.c
 cc -DHAVE_CONFIG_H -I. -I../../include -I../.. -I../../include -I../../include -I../../src -I../../src/xine-engine -I../../src/xine-engine -I../../src/xine-utils -
I../../src/input -I../../src/input -I../../lib -I../../lib -I/usr/local/include -fvisibility=hidden -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE -Wformat=2 -Wno-format-
zero-length -Wmissing-format-attribute -Werror-implicit-function-declaration -Wstrict-aliasing=2 -Wall -Wpointer-arith -Wnested-externs -Wcast-align -Wchar-subscripts -
Wmissing-declarations -Wmissing-prototypes -pipe -msse -msse2 -msse3 -mmmx -march=nocona -march=nocona-g -fno-force-addr -I/usr/local/include -I/usr/local/include/dvdread -
DNDEBUG -MT xineplug_decode_real_la-xine_real_video_decoder.lo -MD -MP -MF .deps/xineplug_decode_real_la-xine_real_video_decoder.Tpo-c xine_real_video_decoder.c  -fPIC -DPIC 
-o .libs/xineplug_decode_real_la-xine_real_video_decoder.o
In file included from ../../src/xine-engine/xine_internal.h:33,
                 from xine_real_video_decoder.c:40:
../../include/xine.h:2230: warning: 'xine_tvsystem' is deprecated
In file included from xine_real_video_decoder.c:45:
real_common.h:49: error: '__environ' defined both normally and as an alias
real_common.h:59: error: 'stderr' defined both normally and as an alias
xine_real_video_decoder.c: In function 'init_codec':
xine_real_video_decoder.c:279: warning: 'xine_xmalloc' is deprecated (declared at ../../src/xine-utils/xineutils.h:624)
xine_real_video_decoder.c: In function 'realdec_decode_data':
xine_real_video_decoder.c:390: warning: pointer targets in passing argument 1 of 'this->rvyuv_transform' differ in signedness
xine_real_video_decoder.c:390: warning: pointer targets in passing argument 2 of 'this->rvyuv_transform' differ in signedness
xine_real_video_decoder.c: In function 'init_realvdec':
xine_real_video_decoder.c:536: warning: unused variable 'config'
gmake[2]: *** [xineplug_decode_real_la-xine_real_video_decoder.lo] Error 1
gmake[2]: Leaving directory `/usr/ports/multimedia/libxine/work/xine-lib-1.1.14/src/libreal'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/multimedia/libxine/work/xine-lib-1.1.14/src'
gmake: *** [all-recursive] Error 1
----8<----8<----

I've uploaded the config.log[1] present in ${PORTSDIR}/multimedia/libxine/work/xine-lib-1.1.14 . Since no one else has received any such error, I've not filed any PRs. 
Following is the test program I wrote to reproduce the error.

----8<----8<----
abbe [~] monte-cristo% cat test.c
extern char ** _environ;
 
#ifndef NULL
#define NULL (char**)0
#endif
 
int main()
{
        _environ = NULL;
}
abbe [~] monte-cristo% cc -o test test.c
/var/tmp//ccz3twdu.o(.text+0x7): In function `main':
: undefined reference to `_environ'
abbe [~] monte-cristo% sed -e s/_environ/environ/g -i '' test.c
abbe [~] monte-cristo% cat test.c
extern char ** environ;
 
#ifndef NULL
#define NULL (char**)0
#endif
 
int main()
{
        environ = NULL;
}
abbe [~] monte-cristo% cc -o test test.c
abbe [xine-lib-1.1.14] monte-cristo% cat /etc/make.conf
CPUTYPE?=nocona
CFLAGS= -O2 -fno-strict-aliasing -pipe -msse -msse2 -msse3 -mmmx -march=nocona
MAKEOPTS=-j3
---->8---->8----

The '__environ' symbol is also not defined. Can anyone hint me, what is misconfigured on my box ?

References:
[1] - http://wahjava.googlepages.com/config.log.libxine (size: 243051 bytes, md5: 807b7dc3458f12c7e685d63aeaf83fae)

TIA
Ashish
-- 
·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20080811/c32d047f/attachment.pgp


More information about the freebsd-ports mailing list