Issue 84 in ctemplate: Compilation steps on AIX 5.3 using gcc+stlport

12 views
Skip to first unread message

ctem...@googlecode.com

unread,
Jan 30, 2012, 9:03:03 AM1/30/12
to google-c...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 84 by rockdrea...@gmail.com: Compilation steps on AIX 5.3 using
gcc+stlport
http://code.google.com/p/ctemplate/issues/detail?id=84

Just leaving a reminder in order to make it easier for the few unlucky
others who need to make this work on this unpleasant platform combination.

First one must patch template_dictionary.cc and tests/statemachine_test.c
using the attached patch file (WARNING, not fully tested yet)

then one must use the magic incantation

export STLPORT_HOME=/whatever

CC="g++" \
CXXFLAGS="-I$STLPORT_HOME/include/stlport -D_REENTRANT
-D_LINUX_SOURCE_COMPAT -D_THREAD_SAFE -D_LARGE_FILE_API" \
LDFLAGS="-L$STLPORT_HOME/lib" \
LIBS="-lstlport -lpthread -lstdc++" \
../ctemplate-2.0/configure

reasons for this:
- patch in template_dictionary.cc: this is because int64 gets defined as
long long int somewhere so I simply use long both in the headers and the
implementation
- patch in statemachine_test.c: this is because I compile everything with
g++ so the #ifdef(__cplusplus) in statemachine.h is not a good
discrimination of what is being compiled. The solution is to use the
statemachine namespace in the .c file
- -D_REENTRANT and -D_THREAD_SAFE are stlport configuration options
- -D_LINUX_SOURCE_COMPAT makes AIX headers more linux-y
- LIBS="-lstlport -lpthread -lstdc++" makes it possible to compile
configure tests and get on, without those pthread support cannot be
detected and compilation fails on arena.cc

I realise this is not a fully working solution (and yes: AIX+gcc is totally
unsupported) but for the unlucky it's a start ;)


Attachments:
ctemplate-aix.diff 1.0 KB

ctem...@googlecode.com

unread,
Jun 1, 2012, 7:38:44 AM6/1/12
to google-c...@googlegroups.com

Comment #1 on issue 84 by olafv...@gmail.com: Compilation steps on AIX
Has this issue been superseded by issue 75? If so, could you close this one?

ctem...@googlecode.com

unread,
Jun 4, 2012, 12:29:24 PM6/4/12
to google-c...@googlegroups.com

Comment #2 on issue 84 by rockdrea...@gmail.com: Compilation steps on AIX
I'm currently building ctemplate with the trial version of xlC but,
considering that xlC costs about 4-5k per developer, I might soon have to
go back to gcc.

So, let's leave it open and I'll update the patch for a more recent version
of ctemplate or close it soon if there's no interest.

Reply all
Reply to author
Forward
0 new messages