delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/10/26/09:29:18

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type:content-transfer-encoding;
bh=J6LG9/JWvbQNcDNjVIUnuilx5WpgCoxmDyvydJHzZyc=;
b=ANIkSgCQpVQ/mswxWvRbaBHq3JZv73yzogJyzSy94xnZc3rWwjw7dhl5xDLnwBIdJ/
TpCSCAq7pO/ZJuoYlNYIKI84XcT4gh5FrcWRrCQLoKUb4lJBSFnHVgLI1E+Szk6ck5ZF
DzuO96eVkh37J/bO6r8HaoRAu196NTIsEEpgs=
MIME-Version: 1.0
In-Reply-To: <ec1c078d-cb5d-45c0-8c12-491b8ae012ac@r28g2000yqj.googlegroups.com>
References: <4ce51722-c2fd-4fe0-8cb9-ebae498c3271 AT r1g2000yqm DOT googlegroups DOT com>
<83k47tc9u2 DOT fsf AT gnu DOT org>
<CAA2C=vAn=NZYHMCc58HqfNZ=cdVbom-cE4ZZV1Pz=ziTT8EsNA AT mail DOT gmail DOT com>
<65da0e3d-29ea-46ae-b23d-ae08652594aa AT a17g2000yqj DOT googlegroups DOT com>
<0a80c084-8135-4c4d-a25c-b56f3eb41e36 AT y36g2000yqm DOT googlegroups DOT com>
<CAA2C=vBVOTxMEjm4qhRkMZ8oT6VManx6_m30qgpFqzp4Gz=ZEQ AT mail DOT gmail DOT com>
<ec1c078d-cb5d-45c0-8c12-491b8ae012ac AT r28g2000yqj DOT googlegroups DOT com>
Date: Wed, 26 Oct 2011 16:29:07 +0300
Message-ID: <CAA2C=vC7F7gz+yQg8FpyiPGu1SZCHOYjcnHd2iqa=-Svof2o1g@mail.gmail.com>
Subject: Re: _rdtsc(void) inline function in time.h - cause problem with
multiple definition during linking
From: Ozkan Sezer <sezeroz AT gmail DOT com>
To: djgpp AT delorie DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id p9QDTDM6014729
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, Oct 26, 2011 at 3:40 PM, RayeR <glaux AT centrum DOT cz> wrote:
> I removed the source of error but i tried to simulate it by including
> time.h in 2 modules.
> The error looked like this:
>
> gcc -o x264.exe x264.o input/input.o input/timecode.o input/raw.o
> input/y4m.o ou
> tput/raw.o output/matroska.o output/matroske.o output/flv.o output/
> flv_byte.o fi
> lters/filters.o filters/video/video.o filters/video/source.o filters/
> video/inter
> nal.o filters/video/resize.o filters/video/cache.o filters/video/
> fix_vfr_.o filt
> ers/video/select_e.o filters/video/crop.o filters/video/depth.o extras/
> getopt.o
> libx264.a  -lm
> libx264.a(macroblo.o):macroblo.c:(.text+0xaf0): multiple definition of
> `__rdtsc'
>
> x264.o:x264.c:(.text+0x7130): first defined here
> collect2: ld returned 1 exit status
> make.exe: *** [x264.exe] Error 1

The problem is with changed inline semantics.  Juan's fix
in recent 2.04 is to use EXTERN_INLINE for _rdtsc, with
EXTERN_INLINE being defined like:

/* Ensure that always traditional GNU extern inline semantics are used
   (aka -fgnu89-inline) even if ISO C99 semantics have been specified.  */
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
# define _EXTERN_INLINE  extern __inline__ __attribute__ ((__gnu_inline__))
#else
# define _EXTERN_INLINE  extern __inline__
#endif

>
> But yeah, thanks to Ozkan Sezer when I tried to rebuild this test case
> with new djdev 2.04
> package the error disappeared - thanks! BTW why not to upload this
> package to /beta or /alpha
> on DJ's site?

Maintainers should decide and do that

>  There seems to be some development of djdev but it may
> be hidden to other users.
>

Well, yes...

> BTW Ozkan, you're author of new Hexen engine? Good work!
>

Yep. Thanks.

--
O.S.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019