Yep, works. There is some warnings like:
*** Making os_execd ***
clang -g -Wall -I../ -I../headers -DCLIENT -DUSE_OPENSSL -DFreeBSD
-DARGV0=\"ossec-execd\" -DOSSECHIDS execd.c exec.c config.c
../shared/lib_shared.a ../os_net/os_net.a ../os_regex/os_regex.a
../os_xml/os_xml.a -o ossec-execd
config.c:45:54: warning: passing 'char *([4]' to parameter of type
'const char **' discards qualifiers in nested pointer types
[-Wincompatible-pointer-types-discards-qualifiers]
disable_entry = OS_GetOneContentforElement(&xml, xmlf);
^~~~
../os_xml/os_xml.h:77:62: note: passing argument to parameter
'element_name' here
char *OS_GetOneContentforElement(OS_XML *_lxml, const char
**element_name) __attribute__((nonnull));
^
config.c:65:51: warning: passing 'char *([4]' to parameter of type
'const char **' discards qualifiers in nested pointer types
[-Wincompatible-pointer-types-discards-qualifiers]
repeated_t = OS_GetOneContentforElement(&xml, blocks);
^~~~~~
../os_xml/os_xml.h:77:62: note: passing argument to parameter
'element_name' here
char *OS_GetOneContentforElement(OS_XML *_lxml, const char
**element_name) __attribute__((nonnull));
^
2 warnings generated.
clang -g -Wall -I../ -I../headers -DCLIENT -DUSE_OPENSSL -DFreeBSD
-DARGV0=\"ossec-execd\" -DOSSECHIDS -c execd.c exec.c config.c
config.c:45:54: warning: passing 'char *([4]' to parameter of type
'const char **' discards qualifiers in nested pointer types
[-Wincompatible-pointer-types-discards-qualifiers]
disable_entry = OS_GetOneContentforElement(&xml, xmlf);
^~~~
../os_xml/os_xml.h:77:62: note: passing argument to parameter
'element_name' here
char *OS_GetOneContentforElement(OS_XML *_lxml, const char
**element_name) __attribute__((nonnull));
^
config.c:65:51: warning: passing 'char *([4]' to parameter of type
'const char **' discards qualifiers in nested pointer types
[-Wincompatible-pointer-types-discards-qualifiers]
repeated_t = OS_GetOneContentforElement(&xml, blocks);
^~~~~~
../os_xml/os_xml.h:77:62: note: passing argument to parameter
'element_name' here
char *OS_GetOneContentforElement(OS_XML *_lxml, const char
**element_name) __attribute__((nonnull));
^
2 warnings generated.
*** Making monitord ***
clang -g -Wall -I../ -I../headers -DCLIENT -DUSE_OPENSSL -DFreeBSD
-DARGV0=\"ossec-monitord\" -DOSSECHIDS compress_log.c main.c
manage_files.c monitor_agents.c monitord.c sign_log.c
generate_reports.c ../os_maild/sendcustomemail.c
../config/lib_config.a ../shared/lib_shared.a ../os_net/os_net.a
../os_regex/os_regex.a ../os_xml/os_xml.a ../os_crypto/os_crypto.a
../os_zlib/os_zlib.c ../external/libz.a -o ossec-monitord
main.c:129:51: warning: passing 'char *([4]' to parameter of type
'const char **' discards qualifiers in nested pointer types
[-Wincompatible-pointer-types-discards-qualifiers]
tmpsmtp = OS_GetOneContentforElement(&xml,xml_smtp);
^~~~~~~~
../os_xml/os_xml.h:77:62: note: passing argument to parameter
'element_name' here
char *OS_GetOneContentforElement(OS_XML *_lxml, const char
**element_name) __attribute__((nonnull));
^
main.c:130:58: warning: passing 'char *([4]' to parameter of type
'const char **' discards qualifiers in nested pointer types
[-Wincompatible-pointer-types-discards-qualifiers]
mond.emailfrom = OS_GetOneContentforElement(&xml,xml_from);
^~~~~~~~
../os_xml/os_xml.h:77:62: note: passing argument to parameter
'element_name' here
char *OS_GetOneContentforElement(OS_XML *_lxml, const char
**element_name) __attribute__((nonnull));
^
main.c:131:61: warning: passing 'char *([4]' to parameter of type
'const char **' discards qualifiers in nested pointer types
[-Wincompatible-pointer-types-discards-qualifiers]
mond.emailidsname = OS_GetOneContentforElement(&xml,xml_idsname);
^~~~~~~~~~~
../os_xml/os_xml.h:77:62: note: passing argument to parameter
'element_name' here
char *OS_GetOneContentforElement(OS_XML *_lxml, const char
**element_name) __attribute__((nonnull));
^
3 warnings generated.
clang -g -Wall -I../ -I../headers -DCLIENT -DUSE_OPENSSL -DFreeBSD
-DARGV0=\"ossec-monitord\" -DOSSECHIDS -UARGV0
-DARGV0=\"ossec-reportd\" report.c ../config/lib_config.a
../shared/lib_shared.a ../os_net/os_net.a ../os_regex/os_regex.a
../os_xml/os_xml.a ../os_crypto/os_crypto.a ../os_zlib/os_zlib.c
../external/libz.a -o ossec-reportd
On Thu, Apr 3, 2014 at 11:42 AM, cgzones <[email protected]> wrote:
> Hi,
>
> dan was right: because my changes were merged into the official
> repository i deleted the clang branch.
>
> Can you try to delete line 9 from src/external/lua-5.2.3/src/Makefile (
> "CC= gcc" ) and try again?
>
>
> On 04/03/2014 12:24 PM, C. L. Martinez wrote:
>> Thanks Dan. Here it is:
>>
>> Using -devel branch from github.com, fails:
>>
>> root@fbsdoss01:/tmp/k/ossec-hids/src # setenv CC /usr/bin/clang
>> root@fbsdoss01:/tmp/k/ossec-hids/src # setenv
>> TERM=xterm
>> BLOCKSIZE=K
>> MAIL=/var/mail/root
>> PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
>> SHELL=/bin/csh
>> HOME=/root
>> USER=root
>> HOSTTYPE=FreeBSD
>> VENDOR=amd
>> OSTYPE=FreeBSD
>> MACHTYPE=x86_64
>> SHLVL=1
>> PWD=/tmp/k/ossec-hids/src
>> LOGNAME=root
>> GROUP=wheel
>> HOST=fbsdoss01.tst.dom
>> REMOTEHOST=lnxwork099
>> EDITOR=vi
>> PAGER=more
>> CC=/usr/bin/clang
>> root@fbsdoss01:/tmp/k/ossec-hids/src # make setclang
>> root@fbsdoss01:/tmp/k/ossec-hids/src # make all
>>
>> *** Making zlib (by Jean-loup Gailly and Mark Adler) ***
>> cd zlib-1.2.8/; ./configure; make libz.a;
>> Checking for shared library support...
>> Building shared library libz.so.1.2.8 with /usr/bin/clang.
>> Checking for off64_t... No.
>> Checking for fseeko... Yes.
>> Checking for strerror... Yes.
>> Checking for unistd.h... Yes.
>> Checking for stdarg.h... Yes.
>> Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
>> Checking for vsnprintf() in stdio.h... Yes.
>> Checking for return value of vsnprintf()... Yes.
>> Checking for attribute(visibility) support... Yes.
>> /usr/bin/clang -O3 -DHAVE_HIDDEN -c adler32.c
>> /usr/bin/clang -O3 -DHAVE_HIDDEN -c crc32.c
>> /usr/bin/clang -O3 -DHAVE_HIDDEN -c deflate.c
>> /usr/bin/clang -O3 -DHAVE_HIDDEN -c infback.c
>> /usr/bin/clang -O3 -DHAVE_HIDDEN -c inffast.c
>> /usr/bin/clang -O3 -DHAVE_HIDDEN -c inflate.c
>> /usr/bin/clang -O3 -DHAVE_HIDDEN -c inftrees.c
>> /usr/bin/clang -O3 -DHAVE_HIDDEN -c trees.c
>> /usr/bin/clang -O3 -DHAVE_HIDDEN -c zutil.c
>> /usr/bin/clang -O3 -DHAVE_HIDDEN -c compress.c
>> /usr/bin/clang -O3 -DHAVE_HIDDEN -c uncompr.c
>> /usr/bin/clang -O3 -DHAVE_HIDDEN -c gzclose.c
>> /usr/bin/clang -O3 -DHAVE_HIDDEN -c gzlib.c
>> /usr/bin/clang -O3 -DHAVE_HIDDEN -c gzread.c
>> /usr/bin/clang -O3 -DHAVE_HIDDEN -c gzwrite.c
>> ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o
>> inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o
>> gzread.o gzwrite.o
>> cp -pr zlib-1.2.8/libz.a .
>> cp -pr zlib-1.2.8/zlib.h zlib-1.2.8/zconf.h ../headers/
>>
>>
>> *** Making cJSON (by Dave Gamble) ***
>> clang -g -Wall -I../../ -I../../headers -DCLIENT -DUSE_OPENSSL
>> -DFreeBSD -DARGV0=\"cJSON\" -DOSSECHIDS -c cJSON.c
>> ar -crus libcJSON.a *.o
>> cp -pr cJSON.h ../../headers/
>> cp -pr libcJSON.a ../
>>
>>
>> *** Making Lua 5.2 (by team at PUC-Rio in Brazi) ***
>> Copyright © 1994–2014 Lua.org, PUC-Rio.
>> cd src && make freebsd
>> make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline"
>> gcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -c lapi.c
>> make[3]: exec(gcc) failed (No such file or directory)
>> *** Error code 1
>>
>> Stop.
>> make[3]: stopped in /tmp/k/ossec-hids/src/external/lua-5.2.3/src
>> *** Error code 1
>>
>> Stop.
>> make[2]: stopped in /tmp/k/ossec-hids/src/external/lua-5.2.3/src
>> *** Error code 1
>>
>> Stop.
>> make[1]: stopped in /tmp/k/ossec-hids/src/external/lua-5.2.3
>>
>> Error Making cJSON
>> *** Error code 1
>>
>> Stop.
>> make: stopped in /tmp/k/ossec-hids/src
>>
>> On Thu, Apr 3, 2014 at 9:53 AM, dan (ddp) <[email protected]> wrote:
>>> On Apr 3, 2014 5:33 AM, "C. L. Martinez" <[email protected]> wrote:
>>>> Hi all,
>>>>
>>>> Due to some problems to install OSSEC under FreeBSD 10 using clang as
>>>> the default compiler
>>>> (http://marc.info/?l=ossec-list&m=139392923610727&w=2), I try to
>>>> compile clang tree from cgzones this morning, but I can't access to
>>>> the repo:
>>>>
>>>> https://github.com/cgzones/ossec-hids/tree/clang
>>>>
>>>> Returns 404 error ...
>>>>
>>>> From where can I download this modified version??
>>>>
>>> Can you file an issue, or at least provide the list with some details as to
>>> what isn't working now?
>>> I'm assuming this commit fixed some of it:
>>> https://github.com/ossec/ossec-hids/commit/1ad24c6e7271e84d66b9933c2ccc9912420431fd
>>>
>>> Other than that, you should probably contact cgzones and ask about his repo.
>>>
>>>> Thanks
>>>>
>>>> --
>>>>
>>>> ---
>>>> You received this message because you are subscribed to the Google Groups
>>>> "ossec-list" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an
>>>> email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>> --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google Groups
>>> "ossec-list" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ossec-list" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups
"ossec-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.