Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation steps on AIX 5.3 using gcc+stlport #84

Open
GoogleCodeExporter opened this issue Mar 12, 2015 · 2 comments
Open

Compilation steps on AIX 5.3 using gcc+stlport #84

GoogleCodeExporter opened this issue Mar 12, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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 ;)

Original issue reported on code.google.com by [email protected] on 30 Jan 2012 at 2:02

Attachments:

@GoogleCodeExporter
Copy link
Author

Has this issue been superseded by issue 75? If so, could you close this one?

Original comment by olafvdspek on 1 Jun 2012 at 11:38

@GoogleCodeExporter
Copy link
Author

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.

Original comment by [email protected] on 4 Jun 2012 at 4:29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant