You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Igor Galić (JIRA)" <ji...@apache.org> on 2010/08/27 23:07:58 UTC

[jira] Commented: (TS-427) Build ATS with clang

    [ https://issues.apache.org/jira/browse/TS-427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903639#action_12903639 ] 

Igor Galić commented on TS-427:
-------------------------------

The stuff with templates:

make[1]: Entering directory `/home/i.galic/Projects/asf/trafficserver/librecords'
clang -DHAVE_CONFIG_H -DREC_BUILD_MGMT2 -I. -I../libinktomi++ -I../librecords -I../iocore/eventsystem -I../iocore/net -I../iocore/cache -I../iocore/aio -I../iocore/utils -I../iocore/cluster -I../iocore/dns -I../iocore/hostdb -I../proxy/mgmt2 -I../proxy/mgmt2/cluster -I../proxy/mgmt2/snmp -I../proxy/mgmt2/web2 -I../proxy/mgmt2/api2/include -I../proxy/mgmt2/utils -I../proxy/http2 -I../proxy/hdrs -I../proxy -I../libinktomi++ -D_LARGEFILE64_SOURCE=1 -D_COMPILE64BIT_SOURCE=1 -D_GNU_SOURCE -D_REENTRANT -Dlinux -I/usr/include/tcl8.5 -DPROCESS_MANAGER -fPIC -march=core2 -msse4.1 -D_FORTIFY_SOURCE=2 -g -pipe -Wall -Werror -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing -Wno-invalid-offsetof -MT librecprocess_a-RecProcess.o -MD -MP -MF .deps/librecprocess_a-RecProcess.Tpo -c -o librecprocess_a-RecProcess.o `test -f 'RecProcess.cc' || echo './'`RecProcess.cc
In file included from RecProcess.cc:24:
In file included from ../libinktomi++/inktomi++.h:86:
In file included from ../libinktomi++/DAllocator.h:44:
../libinktomi++/List.h:245:16: error: use of undeclared identifier 'prev'
    tail = (C*)prev(e);
               ^
               this->
In file included from RecProcess.cc:26:
In file included from ../iocore/eventsystem/P_EventSystem.h:41:
In file included from ../iocore/eventsystem/I_EventSystem.h:37:
In file included from ../iocore/eventsystem/I_EThread.h:30:
../iocore/eventsystem/I_PriorityEventQueue.h:98:23: note: in instantiation of member function 'Queue<class Event, class Event::Link_link>::remove' requested here
    after[e->in_heap].remove(e);
                      ^
In file included from RecProcess.cc:24:
In file included from ../libinktomi++/inktomi++.h:86:
In file included from ../libinktomi++/DAllocator.h:44:
../libinktomi++/List.h:150:7: note: must qualify identifier to find this declaration in dependent base class
  C *&prev(C *e) { return *(C**)&L::prev_link(e); }
      ^
3 diagnostics generated.
make[1]: *** [librecprocess_a-RecProcess.o] Error 1


is explained here: http://www.parashift.com/c++-faq-lite/templates.html#faq-35.19

> Build ATS with clang
> --------------------
>
>                 Key: TS-427
>                 URL: https://issues.apache.org/jira/browse/TS-427
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Build
>    Affects Versions: 2.1.3
>         Environment: OS: Any; Clang --version:
> clang version 1.1 (branches/release_27)
> Target: x86_64-pc-linux-gnu
> Thread model: posix
>            Reporter: Igor Galić
>         Attachments: ats.clang.patch
>
>
> I've started compiling, and cleaning up traffic-server from trunk with clang, with this config:
> i.galic@phoenix ~/Projects/asf/trafficserver (svn)-[trunk:989985] % cat config.notnice
> #! /bin/sh
> #
> # Created by configure
> CC="clang"; export CC
> CXX="clang"; export CXX
> CFLAGS="-fPIC -march=core2 -msse4.1 -D_FORTIFY_SOURCE=2"; export CFLAGS
> CXXFLAGS="-fPIC -march=core2 -msse4.1 -D_FORTIFY_SOURCE=2"; export CXXFLAGS
> LDFLAGS="-Wl,--as-needed -Wl,--warn-common"; export LDFLAGS
> "./configure" \
> "--enable-layout=opt" \
> "--with-user=proxy" \
> "--with-group=proxy" \
> "CC=clang" \
> "CFLAGS=-fPIC -march=core2 -msse4.1 -D_FORTIFY_SOURCE=2" \
> "LDFLAGS=-Wl,--as-needed" \
> "CXX=clang" \
> "$@"
> i.galic@phoenix ~/Projects/asf/trafficserver (svn)-[trunk:989985] %
> Until I hit errors that seemed to include templates.
> I'm uploading the current patch for you to sanity-check and review. If it makes sense, I suppose it does a bit of a clean-up.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.