Questions tagged [xlc]

xlc or xlC is the command to invoke IBM XL C or C++ compiler. It is used on IBMs proprietary platforms like Blue Gene, AIX, z/OS, and z/VM

113 questions
3
votes
2 answers

C++ and IBM compiler bug?

Very interesting piece of code here. I have created it with the only purpose - to demonstrate the behaviour of the xlC compiler. namespace ns { template inline T f() { return T(); } template<> inline double f() { return…
novak Li
  • 223
  • 4
  • 12
3
votes
1 answer

adding parenthesis to a constructor call causes duplicate parameter error in xlc C++ compiler

We are creating a domain specific language that generates C++ code that must compile under gcc and also IBM xlc (version 10.1 for AIX) compilers. One specific code snippet generated C++ code that works perfectly well under gcc, but no so much under…
Pipilio
  • 33
  • 3
2
votes
1 answer

How to avoid label translation when using inline assembly in XLC compiler?

When using inline assembly with XLC compiler (for powerpc) the labels are translated and as a result it is impossible to know the final label name for jumps. Example: int main() { __asm__("mylabel:"); __asm__("nop"); __asm__("b…
2
votes
3 answers

GNU make with xlc compiler

Hoping for a bit of insight here. I have source code for one of our projects, with no documentation on how to compile, and all people who wrote it having left :) We have an issue in it and lucky moi has been tasked to investigate. Currently I'm…
ShogunMonkey
  • 41
  • 2
  • 3
2
votes
0 answers

How can I compile and generate libraries of boost version 1.82.0 in Aix?

Compiling the boost C++ library 1.82.0 on AIX 7.2 using xlclang++ I am trying to build the b2 binary using xlclang++ but getting std errors class.cpp: warning: unknown warning option '-WL'…
Rintu
  • 21
  • 1
2
votes
1 answer

gprof issue with output

The question is: Why is my gprof output only displaying "Index by function name" ? I have compiled my application with the support of this tutorial…
Oliver
  • 41
  • 3
2
votes
2 answers

"std::_debug_memset" is not declared

I'm working on GCC119 from the compile farm. The machine is AIX 7.1, POWER8 with IBM XLC 13.1. I'm trying to use the debug heap: gcc119$ cat test.cxx #include #undef vector #undef pixel #undef bool #include int main(int argc,…
jww
  • 97,681
  • 90
  • 411
  • 885
2
votes
1 answer

AIX C++ Map compile issues

I am unable to compile below code in AIX whereas Linux and Solaris seem to be OK in this regard. Its giving me issues wrt to C++ Map usage and Key pair. #include #include #include #include #include…
user8868992
2
votes
1 answer

Does IBM XL C/C++ provide an init_priority?

We use C++ static initialization order to control the construction of several objects in a C++ library. GCC offers init_priority, and Microsoft offers init_seg(). I'm looking for similar with IBM's XL C/C++ compiler, but my search results are not…
jww
  • 97,681
  • 90
  • 411
  • 885
2
votes
3 answers

xlC and Operation between types "vector unsigned int" and "int" is not allowed

I'm trying to compile a source file on PPC64-LE. I'm using the xlC compiler and the compile is failing. GCC accepts the program, so I'm not really sure what the cause of the problems are. Here's the command line: $ xlc test-p8.c -qarch=pwr8…
jww
  • 97,681
  • 90
  • 411
  • 885
2
votes
2 answers

Equivalent of KMP_AFFINITY=verbose for gnu and ibm openmp libraries?

When using OpenMP on Intel systems, I often find it useful to set KMP_AFFINITY=verbose,(other options...) so the library spits out which cores my threads are actually bound to. I find this helpful when experimenting with different thread binding…
Michael Carilli
  • 371
  • 2
  • 12
2
votes
1 answer

Compiling perl >5.10 on AIX version 5.3

I've been compiling OpenSSL (and thus Perl >5.10, as it is a dependency) on multiple platforms. I've managed to get 1.1.0b compiled on every single platform except AIX, which I can't even compile Perl. I've tried several versions and looked at the…
MojiBake
  • 23
  • 3
2
votes
1 answer

Memory allocation in IBM AIX fails using xlc compiler?

In my code is necessary to allocate several large arrays. However, when I try to use the IBM xlc_r : xlc_r -g -O -L. -qarch=pwr7 -qtune=pwr7 -lesslsmp -lm -qsmp -qthreaded -qmaxmem=-1 2.c int main() { int natom = 5000; while(1) { …
2
votes
3 answers

Altivec -- load of const variable

What is the best way to load from a const pointer using altivec? According to the documentation (and my results) vec_ld doesn't take a const pointer as an…
user1829358
  • 1,041
  • 2
  • 9
  • 19
2
votes
1 answer

IBM XL C compiler - how do I expand user includes but not system includes

Searched all the IBM manuals but surprisingly can't find the answer. I have the following: #include < stdlib.h> #include < stdio.h> #include "userinc1" #include "userinc2" There is a compile option - which has a default of NOSHOWINC If…
djacks
  • 63
  • 9