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

is gcc supported for client applications? #361

Open
milianw opened this issue Sep 21, 2023 · 2 comments
Open

is gcc supported for client applications? #361

milianw opened this issue Sep 21, 2023 · 2 comments

Comments

@milianw
Copy link
Contributor

milianw commented Sep 21, 2023

I'm trying to run oid for the first time, I did this:

./tools/config_gen.py -c g++ build/oid-cfg.toml

which gives me

[types]
containers = [ "/home/milian/projects/src/object-introspection/types/array_type.toml", "/home/milian/projects/src/object-introspection/types/string_type.toml", "/home/milian/projects/src/object-introspection/types/cxx11_string_type.toml", "/home/milian/projects/src/object-introspection/types/folly_iobuf_type.toml", "/home/milian/projects/src/object-introspection/types/folly_iobuf_queue_type.toml", "/home/milian/projects/src/object-introspection/types/set_type.toml", "/home/milian/projects/src/object-introspection/types/multi_set_type.toml", "/home/milian/projects/src/object-introspection/types/unordered_set_type.toml", "/home/milian/projects/src/object-introspection/types/unordered_multiset_type.toml", "/home/milian/projects/src/object-introspection/types/seq_type.toml", "/home/milian/projects/src/object-introspection/types/list_type.toml", "/home/milian/projects/src/object-introspection/types/cxx11_list_type.toml", "/home/milian/projects/src/object-introspection/types/deque_list_type.toml", "/home/milian/projects/src/object-introspection/types/shrd_ptr_type.toml", "/home/milian/projects/src/object-introspection/types/uniq_ptr_type.toml", "/home/milian/projects/src/object-introspection/types/std_map_type.toml", "/home/milian/projects/src/object-introspection/types/std_unordered_map_type.toml", "/home/milian/projects/src/object-introspection/types/std_unordered_multimap_type.toml", "/home/milian/projects/src/object-introspection/types/pair_type.toml", "/home/milian/projects/src/object-introspection/types/stack_container_adapter_type.toml", "/home/milian/projects/src/object-introspection/types/queue_container_adapter_type.toml", "/home/milian/projects/src/object-introspection/types/priority_queue_container_adapter_type.toml", "/home/milian/projects/src/object-introspection/types/ref_wrapper_type.toml", "/home/milian/projects/src/object-introspection/types/multi_map_type.toml", "/home/milian/projects/src/object-introspection/types/folly_small_heap_vector_map.toml", "/home/milian/projects/src/object-introspection/types/folly_optional_type.toml", "/home/milian/projects/src/object-introspection/types/optional_type.toml", "/home/milian/projects/src/object-introspection/types/try_type.toml", "/home/milian/projects/src/object-introspection/types/fb_string_type.toml", "/home/milian/projects/src/object-introspection/types/small_vec_type.toml", "/home/milian/projects/src/object-introspection/types/f14_fast_map.toml", "/home/milian/projects/src/object-introspection/types/f14_node_map.toml", "/home/milian/projects/src/object-introspection/types/f14_value_map.toml", "/home/milian/projects/src/object-introspection/types/f14_vector_map.toml", "/home/milian/projects/src/object-introspection/types/f14_fast_set.toml", "/home/milian/projects/src/object-introspection/types/f14_node_set.toml", "/home/milian/projects/src/object-introspection/types/f14_value_set.toml", "/home/milian/projects/src/object-introspection/types/f14_vector_set.toml", "/home/milian/projects/src/object-introspection/types/sorted_vec_set_type.toml", "/home/milian/projects/src/object-introspection/types/map_seq_type.toml", "/home/milian/projects/src/object-introspection/types/boost_bimap_type.toml", "/home/milian/projects/src/object-introspection/types/repeated_field_type.toml", "/home/milian/projects/src/object-introspection/types/repeated_ptr_field_type.toml", "/home/milian/projects/src/object-introspection/types/caffe2_blob_type.toml", "/home/milian/projects/src/object-introspection/types/std_variant.toml", "/home/milian/projects/src/object-introspection/types/thrift_isset_type.toml", "/home/milian/projects/src/object-introspection/types/weak_ptr_type.toml",]
pass_through = [ [ "std::allocator", "memory",], [ "std::char_traits", "string",], [ "folly::fbstring_core", "folly/FBString.h",],]

[headers]
system_paths = [ "/usr/include/c++/13.2.1", "/usr/include/c++/13.2.1/x86_64-pc-linux-gnu", "/usr/include/c++/13.2.1/backward", "/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include", "/usr/local/include", "/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include-fixed", "/usr/include",]
user_paths = []

but when I try this on a simple example compiled with g++, I get:

./build/oid -S 'entry:_ZN3Foo7doStuffEv:this' -p 126340 -c build/oid-cfg.toml -J
Attached to pid 126340
In file included from 11401709187939684127.cc:27:
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:136:19: error: use of undeclared identifier '__builtin_ia32_addss'
  return (__m128) __builtin_ia32_addss ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:142:19: error: use of undeclared identifier '__builtin_ia32_subss'
  return (__m128) __builtin_ia32_subss ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:148:19: error: use of undeclared identifier '__builtin_ia32_mulss'
  return (__m128) __builtin_ia32_mulss ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:154:19: error: use of undeclared identifier '__builtin_ia32_divss'; did you mean '__builtin_ia32_minss'?
  return (__m128) __builtin_ia32_divss ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:148:19: note: '__builtin_ia32_minss' declared here
  return (__m128) __builtin_ia32_mulss ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:248:10: error: use of undeclared identifier '__builtin_ia32_andps'; did you mean '__builtin_ia32_haddps'?
  return __builtin_ia32_andps (__A, __B);
         ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:248:10: note: '__builtin_ia32_haddps' declared here
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:254:10: error: use of undeclared identifier '__builtin_ia32_andnps'
  return __builtin_ia32_andnps (__A, __B);
         ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:260:10: error: use of undeclared identifier '__builtin_ia32_orps'
  return __builtin_ia32_orps (__A, __B);
         ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:266:10: error: use of undeclared identifier '__builtin_ia32_xorps'
  return __builtin_ia32_xorps (__A, __B);
         ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:294:19: error: use of undeclared identifier '__builtin_ia32_movss'
  return (__m128) __builtin_ia32_movss ((__v4sf) __A,
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:304:19: error: use of undeclared identifier '__builtin_ia32_movss'
  return (__m128) __builtin_ia32_movss ((__v4sf) __A,
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:332:19: error: use of undeclared identifier '__builtin_ia32_movss'
  return (__m128) __builtin_ia32_movss ((__v4sf) __A,
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:342:19: error: use of undeclared identifier '__builtin_ia32_movss'
  return (__m128) __builtin_ia32_movss ((__v4sf) __A,
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:386:19: error: use of undeclared identifier '__builtin_ia32_cmpgtps'; did you mean '__builtin_ia32_cmpltps'?
  return (__m128) __builtin_ia32_cmpgtps ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:374:19: note: '__builtin_ia32_cmpltps' declared here
  return (__m128) __builtin_ia32_cmpltps ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:392:19: error: use of undeclared identifier '__builtin_ia32_cmpgeps'; did you mean '__builtin_ia32_cmpleps'?
  return (__m128) __builtin_ia32_cmpgeps ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:380:19: note: '__builtin_ia32_cmpleps' declared here
  return (__m128) __builtin_ia32_cmpleps ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:416:19: error: use of undeclared identifier '__builtin_ia32_cmpngtps'; did you mean '__builtin_ia32_cmpnltps'?
  return (__m128) __builtin_ia32_cmpngtps ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:386:19: note: '__builtin_ia32_cmpnltps' declared here
  return (__m128) __builtin_ia32_cmpgtps ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:422:19: error: use of undeclared identifier '__builtin_ia32_cmpngeps'; did you mean '__builtin_ia32_cmpnleps'?
  return (__m128) __builtin_ia32_cmpngeps ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:392:19: note: '__builtin_ia32_cmpnleps' declared here
  return (__m128) __builtin_ia32_cmpgeps ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:608:19: error: use of undeclared identifier '__builtin_ia32_cvtsi2ss'; did you mean '__builtin_ia32_cvtsd2ss'?
  return (__m128) __builtin_ia32_cvtsi2ss ((__v4sf) __A, __B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:608:19: note: '__builtin_ia32_cvtsd2ss' declared here
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:608:58: error: cannot initialize a parameter of type '__attribute__((__vector_size__(2 * sizeof(double)))) double' (vector of 2 'double' values) with an lvalue of type 'int'
  return (__m128) __builtin_ia32_cvtsi2ss ((__v4sf) __A, __B);
                                                         ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:624:19: error: use of undeclared identifier '__builtin_ia32_cvtsi642ss'; did you mean '__builtin_ia32_cvtsd2ss'?
  return (__m128) __builtin_ia32_cvtsi642ss ((__v4sf) __A, __B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:608:19: note: '__builtin_ia32_cvtsd2ss' declared here
  return (__m128) __builtin_ia32_cvtsi2ss ((__v4sf) __A, __B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:624:60: error: cannot initialize a parameter of type '__attribute__((__vector_size__(2 * sizeof(double)))) double' (vector of 2 'double' values) with an lvalue of type 'long long'
  return (__m128) __builtin_ia32_cvtsi642ss ((__v4sf) __A, __B);
                                                           ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:631:19: error: use of undeclared identifier '__builtin_ia32_cvtsi642ss'; did you mean '__builtin_ia32_cvtsd2ss'?
  return (__m128) __builtin_ia32_cvtsi642ss ((__v4sf) __A, __B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:608:19: note: '__builtin_ia32_cvtsd2ss' declared here
  return (__m128) __builtin_ia32_cvtsi2ss ((__v4sf) __A, __B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:631:60: error: cannot initialize a parameter of type '__attribute__((__vector_size__(2 * sizeof(double)))) double' (vector of 2 'double' values) with an lvalue of type 'long long'
  return (__m128) __builtin_ia32_cvtsi642ss ((__v4sf) __A, __B);
                                                           ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:671:19: error: use of undeclared identifier '__builtin_ia32_movlhps'; did you mean '__builtin_ia32_movntss'?
  return (__m128) __builtin_ia32_movlhps (__ra, __rb);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:294:19: note: '__builtin_ia32_movntss' declared here
  return (__m128) __builtin_ia32_movss ((__v4sf) __A,
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:671:43: error: cannot initialize a parameter of type 'float *' with an lvalue of type '__v4sf' (vector of 4 'float' values)
  return (__m128) __builtin_ia32_movlhps (__ra, __rb);
                                          ^~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:690:19: error: use of undeclared identifier '__builtin_ia32_movlhps'; did you mean '__builtin_ia32_movntss'?
  return (__m128) __builtin_ia32_movlhps (__ra, __rb);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:294:19: note: '__builtin_ia32_movntss' declared here
  return (__m128) __builtin_ia32_movss ((__v4sf) __A,
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:690:43: error: cannot initialize a parameter of type 'float *' with an lvalue of type '__v4sf' (vector of 4 'float' values)
  return (__m128) __builtin_ia32_movlhps (__ra, __rb);
                                          ^~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:725:19: error: use of undeclared identifier '__builtin_ia32_movlhps'; did you mean '__builtin_ia32_movntss'?
  return (__m128) __builtin_ia32_movlhps (__sfa, __sfb);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:294:19: note: '__builtin_ia32_movntss' declared here
  return (__m128) __builtin_ia32_movss ((__v4sf) __A,
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:725:43: error: cannot initialize a parameter of type 'float *' with an lvalue of type '__v4sf' (vector of 4 'float' values)
  return (__m128) __builtin_ia32_movlhps (__sfa, __sfb);
                                          ^~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:733:19: error: use of undeclared identifier '__builtin_ia32_movhlps'; did you mean '__builtin_ia32_movntss'?
  __v4sf __losf = __builtin_ia32_movhlps (__hisf, __hisf);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:294:19: note: '__builtin_ia32_movntss' declared here
  return (__m128) __builtin_ia32_movss ((__v4sf) __A,
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:733:43: error: cannot initialize a parameter of type 'float *' with an lvalue of type '__v4sf' (vector of 4 'float' values)
  __v4sf __losf = __builtin_ia32_movhlps (__hisf, __hisf);
                                          ^~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:764:19: error: use of undeclared identifier '__builtin_ia32_unpckhps'
  return (__m128) __builtin_ia32_unpckhps ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:771:19: error: use of undeclared identifier '__builtin_ia32_unpcklps'
  return (__m128) __builtin_ia32_unpcklps ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:779:19: error: use of undeclared identifier '__builtin_ia32_loadhps'; did you mean '__builtin_ia32_haddps'?
  return (__m128) __builtin_ia32_loadhps ((__v4sf)__A, (const __v2sf *)__P);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:248:10: note: '__builtin_ia32_haddps' declared here
  return __builtin_ia32_andps (__A, __B);
         ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:779:56: error: cannot initialize a parameter of type '__attribute__((__vector_size__(4 * sizeof(float)))) float' (vector of 4 'float' values) with an rvalue of type 'const __v2sf *'
  return (__m128) __builtin_ia32_loadhps ((__v4sf)__A, (const __v2sf *)__P);
                                                       ^~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:786:3: error: use of undeclared identifier '__builtin_ia32_storehps'
  __builtin_ia32_storehps ((__v2sf *)__P, (__v4sf)__A);
  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:793:19: error: use of undeclared identifier '__builtin_ia32_movhlps'; did you mean '__builtin_ia32_movntss'?
  return (__m128) __builtin_ia32_movhlps ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:294:19: note: '__builtin_ia32_movntss' declared here
  return (__m128) __builtin_ia32_movss ((__v4sf) __A,
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:793:43: error: cannot initialize a parameter of type 'float *' with an rvalue of type '__v4sf' (vector of 4 'float' values)
  return (__m128) __builtin_ia32_movhlps ((__v4sf)__A, (__v4sf)__B);
                                          ^~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:800:19: error: use of undeclared identifier '__builtin_ia32_movlhps'; did you mean '__builtin_ia32_movntss'?
  return (__m128) __builtin_ia32_movlhps ((__v4sf)__A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:294:19: note: '__builtin_ia32_movntss' declared here
  return (__m128) __builtin_ia32_movss ((__v4sf) __A,
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:800:43: error: cannot initialize a parameter of type 'float *' with an rvalue of type '__v4sf' (vector of 4 'float' values)
  return (__m128) __builtin_ia32_movlhps ((__v4sf)__A, (__v4sf)__B);
                                          ^~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:808:19: error: use of undeclared identifier '__builtin_ia32_loadlps'; did you mean '__builtin_ia32_haddps'?
  return (__m128) __builtin_ia32_loadlps ((__v4sf)__A, (const __v2sf *)__P);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:248:10: note: '__builtin_ia32_haddps' declared here
  return __builtin_ia32_andps (__A, __B);
         ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:808:56: error: cannot initialize a parameter of type '__attribute__((__vector_size__(4 * sizeof(float)))) float' (vector of 4 'float' values) with an rvalue of type 'const __v2sf *'
  return (__m128) __builtin_ia32_loadlps ((__v4sf)__A, (const __v2sf *)__P);
                                                       ^~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:815:3: error: use of undeclared identifier '__builtin_ia32_storelps'
  __builtin_ia32_storelps ((__v2sf *)__P, (__v4sf)__A);
  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:827:1: error: definition of builtin function '_mm_getcsr'
_mm_getcsr (void)
^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:859:1: error: definition of builtin function '_mm_setcsr'
_mm_setcsr (unsigned int __I)
^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:1020:19: error: use of undeclared identifier '__builtin_shuffle'
  return (__m128) __builtin_shuffle ((__v4sf)__A, (__v4sf)__B,
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:1289:26: error: cannot initialize a parameter of type '__attribute__((__vector_size__(1 * sizeof(long long)))) long long *' with an rvalue of type 'unsigned long long *'
  __builtin_ia32_movntq ((unsigned long long *)__P, (unsigned long long)__A);
                         ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:1296:3: error: use of undeclared identifier '__builtin_ia32_movntps'; did you mean '__builtin_ia32_movntss'?
  __builtin_ia32_movntps (__P, (__v4sf)__A);
  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:294:19: note: '__builtin_ia32_movntss' declared here
  return (__m128) __builtin_ia32_movss ((__v4sf) __A,
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:1302:1: error: definition of builtin function '_mm_sfence'
_mm_sfence (void)
^
In file included from 11401709187939684127.cc:27:
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:1322:
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:120:34: error: use of undeclared identifier '__builtin_shuffle'
  return __extension__ (__m128d) __builtin_shuffle ((__v2df)__A, (__v2df)__B, (__v2di){2, 1});
                                 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:257:19: error: use of undeclared identifier '__builtin_ia32_addsd'
  return (__m128d)__builtin_ia32_addsd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:269:19: error: use of undeclared identifier '__builtin_ia32_subsd'
  return (__m128d)__builtin_ia32_subsd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:281:19: error: use of undeclared identifier '__builtin_ia32_mulsd'
  return (__m128d)__builtin_ia32_mulsd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:293:19: error: use of undeclared identifier '__builtin_ia32_divsd'; did you mean '__builtin_ia32_minsd'?
  return (__m128d)__builtin_ia32_divsd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:281:19: note: '__builtin_ia32_minsd' declared here
  return (__m128d)__builtin_ia32_mulsd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:306:18: error: use of undeclared identifier '__builtin_ia32_movsd'
  __v2df __tmp = __builtin_ia32_movsd ((__v2df)__A, (__v2df)__B);
                 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:337:19: error: use of undeclared identifier '__builtin_ia32_andpd'; did you mean '__builtin_ia32_haddpd'?
  return (__m128d)__builtin_ia32_andpd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:779:19: note: '__builtin_ia32_haddpd' declared here
  return (__m128) __builtin_ia32_loadhps ((__v4sf)__A, (const __v2sf *)__P);
                  ^
In file included from 11401709187939684127.cc:27:
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:1322:
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:343:19: error: use of undeclared identifier '__builtin_ia32_andnpd'
  return (__m128d)__builtin_ia32_andnpd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:349:19: error: use of undeclared identifier '__builtin_ia32_orpd'
  return (__m128d)__builtin_ia32_orpd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:355:19: error: use of undeclared identifier '__builtin_ia32_xorpd'
  return (__m128d)__builtin_ia32_xorpd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:379:19: error: use of undeclared identifier '__builtin_ia32_cmpgtpd'; did you mean '__builtin_ia32_cmpltpd'?
  return (__m128d)__builtin_ia32_cmpgtpd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:367:19: note: '__builtin_ia32_cmpltpd' declared here
  return (__m128d)__builtin_ia32_cmpltpd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:385:19: error: use of undeclared identifier '__builtin_ia32_cmpgepd'; did you mean '__builtin_ia32_cmplepd'?
  return (__m128d)__builtin_ia32_cmpgepd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:373:19: note: '__builtin_ia32_cmplepd' declared here
  return (__m128d)__builtin_ia32_cmplepd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:409:19: error: use of undeclared identifier '__builtin_ia32_cmpngtpd'; did you mean '__builtin_ia32_cmpnltpd'?
  return (__m128d)__builtin_ia32_cmpngtpd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:416:19: note: '__builtin_ia32_cmpnltpd' declared here
  return (__m128) __builtin_ia32_cmpngtps ((__v4sf)__A, (__v4sf)__B);
                  ^
In file included from 11401709187939684127.cc:27:
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:1322:
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:415:19: error: use of undeclared identifier '__builtin_ia32_cmpngepd'; did you mean '__builtin_ia32_cmpnlepd'?
  return (__m128d)__builtin_ia32_cmpngepd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:385:19: note: '__builtin_ia32_cmpnlepd' declared here
  return (__m128d)__builtin_ia32_cmpgepd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:451:20: error: use of undeclared identifier '__builtin_ia32_movsd'
  return (__m128d) __builtin_ia32_movsd ((__v2df) __A,
                   ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:461:20: error: use of undeclared identifier '__builtin_ia32_movsd'
  return (__m128d) __builtin_ia32_movsd ((__v2df) __A,
                   ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:489:20: error: use of undeclared identifier '__builtin_ia32_movsd'
  return (__m128d) __builtin_ia32_movsd ((__v2df) __A,
                   ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:499:20: error: use of undeclared identifier '__builtin_ia32_movsd'
  return (__m128d) __builtin_ia32_movsd ((__v2df) __A,
                   ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:784:19: error: use of undeclared identifier '__builtin_ia32_movq128'
  return (__m128i)__builtin_ia32_movq128 ((__v2di) __A);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:808:19: error: use of undeclared identifier '__builtin_ia32_cvtdq2pd'
  return (__m128d)__builtin_ia32_cvtdq2pd ((__v4si) __A);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:814:18: error: use of undeclared identifier '__builtin_ia32_cvtdq2ps'
  return (__m128)__builtin_ia32_cvtdq2ps ((__v4si) __A);
                 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:868:19: error: use of undeclared identifier '__builtin_ia32_cvtps2pd'
  return (__m128d)__builtin_ia32_cvtps2pd ((__v4sf) __A);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:924:19: error: use of undeclared identifier '__builtin_ia32_cvtsi2sd'
  return (__m128d)__builtin_ia32_cvtsi2sd ((__v2df) __A, __B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:932:19: error: use of undeclared identifier '__builtin_ia32_cvtsi642sd'
  return (__m128d)__builtin_ia32_cvtsi642sd ((__v2df) __A, __B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:939:19: error: use of undeclared identifier '__builtin_ia32_cvtsi642sd'
  return (__m128d)__builtin_ia32_cvtsi642sd ((__v2df) __A, __B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:946:19: error: use of undeclared identifier '__builtin_ia32_cvtss2sd'
  return (__m128d)__builtin_ia32_cvtss2sd ((__v2df) __A, (__v4sf)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:964:19: error: use of undeclared identifier '__builtin_ia32_unpckhpd'
  return (__m128d)__builtin_ia32_unpckhpd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:970:19: error: use of undeclared identifier '__builtin_ia32_unpcklpd'
  return (__m128d)__builtin_ia32_unpcklpd ((__v2df)__A, (__v2df)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:976:19: error: use of undeclared identifier '__builtin_ia32_loadhpd'
  return (__m128d)__builtin_ia32_loadhpd ((__v2df)__A, __B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:982:19: error: use of undeclared identifier '__builtin_ia32_loadlpd'
  return (__m128d)__builtin_ia32_loadlpd ((__v2df)__A, __B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1012:19: error: use of undeclared identifier '__builtin_ia32_punpckhbw128'
  return (__m128i)__builtin_ia32_punpckhbw128 ((__v16qi)__A, (__v16qi)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1018:19: error: use of undeclared identifier '__builtin_ia32_punpckhwd128'
  return (__m128i)__builtin_ia32_punpckhwd128 ((__v8hi)__A, (__v8hi)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1024:19: error: use of undeclared identifier '__builtin_ia32_punpckhdq128'
  return (__m128i)__builtin_ia32_punpckhdq128 ((__v4si)__A, (__v4si)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1030:19: error: use of undeclared identifier '__builtin_ia32_punpckhqdq128'
  return (__m128i)__builtin_ia32_punpckhqdq128 ((__v2di)__A, (__v2di)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1036:19: error: use of undeclared identifier '__builtin_ia32_punpcklbw128'
  return (__m128i)__builtin_ia32_punpcklbw128 ((__v16qi)__A, (__v16qi)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1042:19: error: use of undeclared identifier '__builtin_ia32_punpcklwd128'
  return (__m128i)__builtin_ia32_punpcklwd128 ((__v8hi)__A, (__v8hi)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1048:19: error: use of undeclared identifier '__builtin_ia32_punpckldq128'
  return (__m128i)__builtin_ia32_punpckldq128 ((__v4si)__A, (__v4si)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1054:19: error: use of undeclared identifier '__builtin_ia32_punpcklqdq128'
  return (__m128i)__builtin_ia32_punpcklqdq128 ((__v2di)__A, (__v2di)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1084:19: error: use of undeclared identifier '__builtin_ia32_paddsb128'
  return (__m128i)__builtin_ia32_paddsb128 ((__v16qi)__A, (__v16qi)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1090:19: error: use of undeclared identifier '__builtin_ia32_paddsw128'
  return (__m128i)__builtin_ia32_paddsw128 ((__v8hi)__A, (__v8hi)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1096:19: error: use of undeclared identifier '__builtin_ia32_paddusb128'
  return (__m128i)__builtin_ia32_paddusb128 ((__v16qi)__A, (__v16qi)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1102:19: error: use of undeclared identifier '__builtin_ia32_paddusw128'
  return (__m128i)__builtin_ia32_paddusw128 ((__v8hi)__A, (__v8hi)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1132:19: error: use of undeclared identifier '__builtin_ia32_psubsb128'
  return (__m128i)__builtin_ia32_psubsb128 ((__v16qi)__A, (__v16qi)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1138:19: error: use of undeclared identifier '__builtin_ia32_psubsw128'
  return (__m128i)__builtin_ia32_psubsw128 ((__v8hi)__A, (__v8hi)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1144:19: error: use of undeclared identifier '__builtin_ia32_psubusb128'
  return (__m128i)__builtin_ia32_psubusb128 ((__v16qi)__A, (__v16qi)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1150:19: error: use of undeclared identifier '__builtin_ia32_psubusw128'
  return (__m128i)__builtin_ia32_psubusw128 ((__v8hi)__A, (__v8hi)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1323:19: error: use of undeclared identifier '__builtin_ia32_pandn128'
  return (__m128i)__builtin_ia32_pandn128 ((__v2di)__A, (__v2di)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1415:19: error: use of undeclared identifier '__builtin_ia32_pmaxsw128'
  return (__m128i)__builtin_ia32_pmaxsw128 ((__v8hi)__A, (__v8hi)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1421:19: error: use of undeclared identifier '__builtin_ia32_pmaxub128'
  return (__m128i)__builtin_ia32_pmaxub128 ((__v16qi)__A, (__v16qi)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1427:19: error: use of undeclared identifier '__builtin_ia32_pminsw128'
  return (__m128i)__builtin_ia32_pminsw128 ((__v8hi)__A, (__v8hi)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1433:19: error: use of undeclared identifier '__builtin_ia32_pminub128'
  return (__m128i)__builtin_ia32_pminub128 ((__v16qi)__A, (__v16qi)__B);
                  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1516:3: error: use of undeclared identifier '__builtin_ia32_movntdq'
  __builtin_ia32_movntdq ((__v2di *)__A, (__v2di)__B);
  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1522:3: error: use of undeclared identifier '__builtin_ia32_movntpd'
  __builtin_ia32_movntpd (__A, (__v2df)__B);
  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1526:1: error: definition of builtin function '_mm_clflush'
_mm_clflush (void const *__A)
^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1532:1: error: definition of builtin function '_mm_lfence'
_mm_lfence (void)
^
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/emmintrin.h:1538:1: error: definition of builtin function '_mm_mfence'
_mm_mfence (void)
^
In file included from 11401709187939684127.cc:27:
/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include/xmmintrin.h:1335:1: error: definition of builtin function '_mm_pause'
_mm_pause (void)
^
105 errors generated.
E0921 22:58:16.711515 126367 OICompiler.cpp:578] Execute failed
E0921 22:58:16.712093 126367 OIDebugger.cpp:2224] Failed to compile code
E0921 22:58:16.712109 126367 OID.cpp:368] Compilation failed

these are seemingly due to the jit compiler trying to use the headers from g++, which is not a good idea, as these headers are g++ specific and not clang compatible. We have had similar issues when trying to parse C++ code in cmake projects build with g++ in kdevelop. There, we can hack around this by always using the clang provided system headers and then doing some hackery to make the rest of the code still assume it's using g++.

But with my still very limited understanding of OI, I'm unsure if that's an option. Does that mean one cannot use OI at all on code compiled with g++? That would be a pity, because while I might easily use g++ for my own code, all system libraries are compiled with g++ on most distributions...

@milianw
Copy link
Contributor Author

milianw commented Sep 21, 2023

when I use a oid-cfg.toml for clang16++ instead, then the above errors don't appear, but are replaced with:

E0921 23:08:22.902594 127159 OIDebugger.cpp:1070] SIGSEGV: faulting addr 0x8 rip 7f7bf98131d4 (pid 127140)
E0921 23:08:22.902695 127159 OIDebugger.cpp:1079] SEGV handling trap state found for 127140
E0921 23:08:22.909386 127159 OIDebugger.cpp:2694] Data segment is empty. Something went wrong while probing...
E0921 23:08:22.909401 127159 OIDebugger.cpp:2814] Failed to decode target data for arg: this
E0921 23:08:22.911756 127159 OID.cpp:442] Problems processing target data

The same seems to happen when I compile the client application with clang++ (instead of g++).

Only when I use clang15 that was found during compilation of OI for its internal jit compiler for both, the oid-cfg.toml and the client application, does it seem to work finally:

Attached to pid 127519
SUCCESS

Is this expected from your POV, i.e. does one have to use the same clang for OI JIT, oid-cfg.toml and the client application code?

@tyroguru
Copy link
Contributor

Thanks massively @milianw for doing all this work and helping OI greatly! As @JakeHillion said to you in another issue, you are bearing the brunt of the pain being the first contributor and outside Meta user of OI. We will definitely do our utmost to make sure you get to a place where OI is as useful to you as it is to us. Please bear with us in the coming days and weeks as the team has a few big OI projects internally that we're wrestling with and we're also at CppCon in a few weeks.

I don't understand what is going off in your environment and maybe config_gen.py has a lot to answer for. Unfortunately with moving to an ARM based Mac means I can't even try and reproduce your environment in any meaningful way (i'm getting some x86 based systems for non-Meta setups but that will take a little time).

What I can do though is to take a look through some debug and try to figure it from there. if you have time could you do the above clang16++ oid invocation (the failing one) as well as the clang15 one (the successful one) but add the following flags to the oid invocation: -fjit-logging -ftype-graph -d 4. Please redirect the stdout and stderr of oid to a file and attach them to the issue please. Also, you will see a file in /tmp with a name structure of /tmp/oid-<pid>.jit.log (e.g. /tmp/oid-3729644.jit.log). Could you also upload these as well please? The pid in the jit log file name is the target process pid and not the oid pid therefore multiple invocations of oid against the same process will all go into the same file if jit-logging is enabled.

Just let me know if you have any questions.

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

No branches or pull requests

2 participants