Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 20 Jan 2013 12:51:00 +0100
From: Frank Dittrich <>
Subject: Re: clang build error

On 01/20/2013 12:03 PM, Solar Designer wrote:
> On Tue, Jan 15, 2013 at 11:35:24PM +0100, Frank Dittrich wrote:
>> On 01/15/2013 11:05 PM, magnum wrote:
>>> On 15 Jan, 2013, at 22:29 , magnum <> wrote:
>>>> Frank pointed out that the following will mute the inline warnings:
>>>>  -#define MAYBE_INLINE attribute((always_inline))
>>>>  +#define MAYBE_INLINE attribute((always_inline)) inline
>>>> Should we commit this? I don't really understand the difference.
>>> I did so. Some googling reveals this is a better definition anyway, since at least some compilers will totally ignore that attribute without the inline specification added.
> OK, let's make this change.
>>> I also replaced a similar construct in dummy.c to MAYBE_INLINE, maybe you should in core too.
> It's already MAYBE_INLINE in dummy.c in core (for some months).
>> When I did that common.h change (MAYBE_INLINE definition), I got a build
>> error for the linux-x86-64-clang make target.
>> clang 3.1 claims to be compatible with gcc 4.2.1.
>> So may be we can only add inline to that definition for __GNUC__ > 4 ||
>> __GNUC__ == 4 && __GNUC_MINOR__ >= 7)
> That's bad news.  What specific error message did clang give?

May be clang found a real bug here.
With latest git (+changing the MAYBE_INLINE definition in common.h), I
get for linux-x86-64-clang on Fedora 18 (clang 3.1):

dynamic_fmt.o: In function `DynamicFunc__crypt_md5':
dynamic_fmt.c:(.text+0x4ce0): undefined reference to `MD5_body'
dynamic_fmt.o: In function `DynamicFunc__POCrypt':
dynamic_fmt.c:(.text+0x6516): undefined reference to `MD5_body'
dynamic_fmt.o: In function `DynamicFunc__crypt2_md5':
dynamic_fmt.c:(.text+0x6670): undefined reference to `MD5_body'
dynamic_fmt.o: In function `DynamicFunc__crypt_md5_in1_to_out2':
dynamic_fmt.c:(.text+0x6900): undefined reference to `MD5_body'
dynamic_fmt.o: In function `DynamicFunc__crypt_md5_in2_to_out1':
dynamic_fmt.c:(.text+0x6c20): undefined reference to `MD5_body'
dynamic_fmt.o:dynamic_fmt.c:(.text+0x71f0): more undefined references to
`MD5_body' follow
clang: error: linker command failed with exit code 1 (use -v to see
make[1]: *** [../run/john] Error 1
make: *** [linux-x86-64-clang] Error 2


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.