Intel Pin under Valgrind. Library error? - valgrind

When i run intel pin under valgrind i get the following error:
ERROR: ld.so: object '/usr/lib/valgrind/vgpreload_core-x86-linux.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
i have valgrind-3.10.1
with
dpkg -l | grep libc6
i get
ii libc6:amd64 2.19-0ubuntu6.9 amd64 Embedded GNU C Library: Shared libraries
ii libc6:i386 2.19-0ubuntu6.9 i386 Embedded GNU C Library: Shared libraries
ii libc6-dbg:amd64 2.19-0ubuntu6.9 amd64 Embedded GNU C Library: detached debugging symbols
ii libc6-dbg:i386 2.19-0ubuntu6.9 i386 Embedded GNU C Library: detached debugging symbols
ii libc6-dev:amd64 2.19-0ubuntu6.9 amd64 Embedded GNU C Library: Development Libraries and Header Files
ii libc6-i386 2.19-0ubuntu6.9 amd64 Embedded GNU C Library: 32-bit shared libraries for AMD64
any suggestions?

Related

Unable to build flatc compiler flatbuffer v1.3.0

We are using flatbuffer v1.3.0 and seeing error building flatc compiler.
Same error for flatbuffer version v1.3.0 to v1.12.1
Build is successful for version 2.0.0
Should we use a particular version of make to build the flatc compiler? If so how to do it?
Steps
git clone https://github.com/google/flatbuffers/tree/v1.3.0
cd flatbuffers
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -Success
make --Error
Versions installed on MacOS BigSur Version 11.6
$ cmake --version
cmake version 3.19.4
CMake suite maintained and supported by Kitware (kitware.com/cmake).
$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is AppleClang 13.0.0.13000029
-- The CXX compiler identification is AppleClang 13.0.0.13000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/abcd/Documents/FlatBuffer/flatbuffers
$ make
Scanning dependencies of target flatc
[ 2%] Building CXX object CMakeFiles/flatc.dir/src/idl_parser.cpp.o
In file included from /Users/abcd/Documents/FlatBuffer/flatbuffers/src/idl_parser.cpp:28:
In file included from /Users/abcd/Documents/FlatBuffer/flatbuffers/include/flatbuffers/idl.h:25:
/Users/abcd/Documents/FlatBuffer/flatbuffers/include/flatbuffers/flatbuffers.h:1086:25: error: definition of implicit copy constructor for 'TableKeyComparator<reflection::Object>' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
TableKeyComparator& operator= (const TableKeyComparator&);
^
/Users/abcd/Documents/FlatBuffer/flatbuffers/include/flatbuffers/flatbuffers.h:1100:27: note: in implicit copy constructor for 'flatbuffers::FlatBufferBuilder::TableKeyComparator<reflection::Object>' first required here
std::sort(v, v + len, TableKeyComparator<T>(buf_));
^
/Users/abcd/Documents/FlatBuffer/flatbuffers/include/flatbuffers/flatbuffers.h:1113:12: note: in instantiation of function template specialization 'flatbuffers::FlatBufferBuilder::CreateVectorOfSortedTables<reflection::Object>' requested here
return CreateVectorOfSortedTables(v->data(), v->size());
^
/Users/abcd/Documents/FlatBuffer/flatbuffers/src/idl_parser.cpp:2008:35: note: in instantiation of function template specialization 'flatbuffers::FlatBufferBuilder::CreateVectorOfSortedTables<reflection::Object>' requested here```
Flatbuffer requires a specific version of clang to compile the 1.12.1.
Installing the required version.
sudo apt-get install clang-6.0 lld-6.0 clang-tidy-6.0
use update-alternatives to link the clang.
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 10
sudo update-alternatives --install /usr/bin/clang++ clang++
/usr/bin/clang++-6.0 10

how to build gst-rtsp-server on windows?

i got source code form https://github.com/GStreamer/gst-rtsp-server,
then i follow https://mesonbuild.com/Getting-meson.html to Installing Meson and Ninja with the MSI installer.
but when i run build it seems like not correct.
D:\>cd gst-rtsp-server-master
D:\gst-rtsp-server-master>meson build
The Meson build system
Version: 0.56.0
Source dir: D:\gst-rtsp-server-master
Build dir: D:\gst-rtsp-server-master\build
Build type: native build
Project name: gst-rtsp-server
Project version: 1.19.0.1
C compiler for the host machine: clang (clang 8.0.0 "clang version 8.0.0 (tags/RELEASE_800/final)")
C linker for the host machine: clang link 14.16.27042.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports link arguments -Wl,-Bsymbolic-functions: YES
Compiler for C supports arguments -fvisibility=hidden: YES
Compiler for C supports arguments -fno-strict-aliasing: YES
Message: Disabling deprecated GLib API
Compiler for C supports arguments -Wmissing-declarations: YES
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Wredundant-decls: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wwrite-strings: YES
Compiler for C supports arguments -Wformat: YES
Compiler for C supports arguments -Wformat-nonliteral: YES
Compiler for C supports arguments -Wformat-security: YES
Compiler for C supports arguments -Wold-style-definition: YES
Compiler for C supports arguments -Waggregate-return: YES
Compiler for C supports arguments -Winit-self: YES
Compiler for C supports arguments -Wmissing-include-dirs: YES
Compiler for C supports arguments -Waddress: YES
Compiler for C supports arguments -Wno-multichar: YES
Compiler for C supports arguments -Wdeclaration-after-statement: YES
Compiler for C supports arguments -Wvla: YES
Compiler for C supports arguments -Wpointer-arith: YES
Did not find pkg-config by name 'pkg-config'
Found Pkg-config: NO
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency glib-2.0 found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency glib-2.0
meson.build:136:0: ERROR: Neither a subproject directory nor a glib.wrap file was found.
A full log can be found at D:\gst-rtsp-server-master\build\meson-logs\meson-log.txt
i am totaly confused.please help...
This is not really trivial on windows. I performed the following steps to pull this off:
Install visual studio 2019
Install gstreamer vs2019 edition with developer headers
Install Ninja-build
Install meson: python -m pip install meson
Open a x64 visual studio command shell
Update your path variable in this shell: set PATH=C:\gstreamer\1.0\msvc_x86_64\bin;%PATH% (note that pkg-config is included in the installation of gstreamer).
cd to your path where you cloned gst-rtsp-server
Run meson setup: meson setup build
Compile the rtsp code meson compile -C build
Run build\examples\test-readme.exe
Connect to the rtsp stream using VLC

Compiling mpfr 4.0.2 on AIX fails to configure TLS support

I'm trying to compile mpfr on AIX and get an error finding TLS support. My end goal is to have a working gcc (9.3) with libstdc++ support for threads and TLS.
I tried compiling with both an existing gcc on the machine (which is 8.3 and doesn't have TLS support, as it seems) and using the built-in xlC (V12.1) on the machine.
I compiled GMP-6.2.0:
(gcc attempt): ./configure --enable-shared --enable-static CFLAGS=-fPIC CXXFLAGS=-fPIC --prefix=$OUTDIR --host=powerpc-ibm-aix7.1.0.0
(xlc attempt): ./configure --enable-shared --enable-static CC=xlc CXX=xlc CFLAGS=-qPIC CXXFLAGS=-qPIC --prefix=$OUTDIR --host=powerpc-ibm-aix7.1.0.0
gmake all
gmake check
gmake install
In both cases gmp successfully tests and installs.
Trying to configure mpfr-4.0.2 results in
(gcc attempt): ./configure --enable-shared --enable-static CFLAGS=-fPIC CXXFLAGS=-fPIC --with-gmp=$OUTDIR --prefix=$OUTDIR --host=powerpc-ibm-aix7.1.0.0
(xlc attempt): ./configure --enable-shared --enable-static CC=xlc CXX=xlc CFLAGS="-qPIC -qtls" CXXFLAGS="-qPIC -qtls" --with-gmp=$OUTDIR --prefix=$OUTDIR --host=powerpc-ibm-aix7.1.0.0
results in the following error in config.log
(gcc attempt):
configure:16567: checking for TLS support
configure:16595: gcc -o conftest -fPIC -I{OUTDIR}/include -I./src -L{OUTDIR}/lib conftest.c >&5
ld: 0711-317 ERROR: Undefined symbol: __tls_get_addr
(xlc attempt):
configure:16567: checking for TLS support
configure:16595: xlc -o conftest -qPIC -qtls -I{OUTDIR}/include -I./src -L{OUTDIR}/lib conftest.c >&5
ld: 0711-317 ERROR: Undefined symbol: .__tls_get_addr
I've tried a dozen different flags and configurations but mostly I don't think I'm in the correct direction - every dependency seems circular. I believe compiling with xlc is the correct idea here, but I just can't figure how to get it properly support TLS.
I also thought that I can ignore this and continue, and later compile libstdc++ again with support for TLS - but that also brought me to a dead end.
Edit:
Taking more actions on using xlc: I tried compiling the generated conftest.c (https://gist.github.com/NitzanEgozy/265e54e3353aefc79558c860b543a98f) manually:
$ xlc -o conftest -qPIC -qtls -I$OUTDIR/include -I./src -L$OUTDIR/lib conftest.c -bnoquiet
(ld): halt 4
(ld): setfflag 4
(ld): savename conftest
(ld): filelist 6 1
(ld): i /lib/crt0.o
(ld): i conftest.o
(ld): lib /usr/vac/lib/libxlopt.a
(ld): lib /usr/vac/lib/libxlipa.a
(ld): lib /usr/vac/lib/libxl.a
(ld): lib /usr/lib/libc.a
LIBRARY: Shared object libc.a[shr.o]: 3301 symbols imported.
LIBRARY: Shared object libc.a[meth.o]: 2 symbols imported.
LIBRARY: Shared object libc.a[posix_aio.o]: 20 symbols imported.
LIBRARY: Shared object libc.a[aio.o]: 18 symbols imported.
LIBRARY: Shared object libc.a[pse.o]: 8 symbols imported.
LIBRARY: Shared object libc.a[dl.o]: 4 symbols imported.
LIBRARY: Shared object libc.a[pty.o]: 1 symbols imported.
LIBRARY: Shared object libc.a[cthread.o]: 25 symbols imported.
FILELIST: Number of previously inserted files processed: 6
(ld): resolve
RESOLVE: 33 of 7029 symbols were kept.
(ld): addgl /usr/lib/glink.o
ADDGL: Glink code added for 2 symbols.
(ld): er full
ld: 0711-318 ERROR: Undefined symbols were found.
The following symbols are in error:
Symbol Inpndx TY CL Source-File(Object-File) OR Import-File{Shared-object}
RLD: Address Section Rld-type Referencing Symbol
----------------------------------------------------------------------------------------------
.__tls_get_addr [30] ER PR conftest.c(conftest.o)
00000010 .text R_RBA [16] .main
Removing -qtls throws The '__thread' keyword is not supported on the target platform. The keyword is ignored.
AFAIK if native TLS is not available gcc emulates it using pthread keys, and i think gcc does not even support native TLS on aix. adding "-pthread" flag to the configuration will enable the appropriate threading support.
the current gcc from the ibm aixtoolbox has the appropriate default threading model enabled, hope this helps a little bit.
root#aixbuildhostng: /root # gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix7.1.0.0/8.3.0/lto-wrapper
Target: powerpc-ibm-aix7.1.0.0
Configured with: ../gcc-8.3.0/configure --prefix=/opt/freeware --mandir=/opt/freeware/man --infodir=/opt/freeware/info --with-local-prefix=/opt/freeware --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran,objc,obj-c++ --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --with-cloog=no --with-ppl=no --disable-libstdcxx-pch --enable-__cxa_atexit --host=powerpc-ibm-aix7.1.0.0
Thread model: aix
gcc version 8.3.0 (GCC)
mpfr 4.0.2 is also available as an rpm package:
root#aixbuildhostng: /root # yum search mpfr
Loaded plugins: aliases, allowdowngrade, basearchonly, changelog, downloadonly, fastestmirror, filter-data, keys, list-data, local, merge-conf, post-transaction-actions, priorities, protectbase, ps, remove-with-leaves, rpm-warm-cache,
: show-leaves, tmprepo, tsflags, verify, versionlock
Loading mirror speeds from cached hostfile
0 packages excluded due to repository protections
============================================================================================================= N/S Matched: mpfr =============================================================================================================
mpfr-devel.ppc : Development tools A C library for mpfr library
mpfr.ppc : A C library for multiple-precision floating-point computations
ad bootstrapping gcc via xlc...this quite a sophisticated task, i never managed to make this work.
https://gcc.gnu.org/install/specific.html#x-ibm-aix

Compiling on Beagleboard - Fail on AR

I am Compiling on a Beagleboard-Xm, Kernel:
root#beagleboard:~# uname -a
Linux beagleboard 2.6.32 #3 PREEMPT Tue Jul 26 10:56:56 CEST 2011 armv7l unknown
I now try to compile a static library with CMake, and everything is working fine, until it comes to linking of the library:
root#beagleboard:/usr/src/build/beaglebuild# make
Scanning dependencies of target phoenix_base
[ 2%] Building CXX object 00_phoenix_base/CMakeFiles/phoenix_base.dir/src/exec_buffer.cpp.o
[ 5%] Building CXX object 00_phoenix_base/CMakeFiles/phoenix_base.dir/src/func_buffer.cpp.o
[ 8%] Building CXX object 00_phoenix_base/CMakeFiles/phoenix_base.dir/src/worker.cpp.o
[ 11%] Building CXX object 00_phoenix_base/CMakeFiles/phoenix_base.dir/src/workermanager.cpp.o
[ 14%] Building CXX object 00_phoenix_base/CMakeFiles/phoenix_base.dir/src/command.cpp.o
[ 17%] Building CXX object 00_phoenix_base/CMakeFiles/phoenix_base.dir/src/logger.cpp.o
[ 20%] Building CXX object 00_phoenix_base/CMakeFiles/phoenix_base.dir/src/signal.cpp.o
Linking CXX static library libphoenix_base.a
BusyBox v1.13.2 (2011-02-25 16:46:47 CET) multi-call binary
Usage: ar [-o] [-v] [-p] [-t] [-x] ARCHIVE FILES
Extract or list FILES from an ar archive
Options:
-o Preserve original dates
-p Extract to stdout
-t List
-x Extract
-v Verbose
make[2]: *** [00_phoenix_base/libphoenix_base.a] Error 1
make[1]: *** [00_phoenix_base/CMakeFiles/phoenix_base.dir/all] Error 2
make: *** [all] Error 2
In my the "ar --help" prints the same stuff.
Is there a way to get linking running on the board?
What may be the Issue?
Some other System Versions:
root#beagleboard:~# cmake --version
cmake version 2.8.2
root#beagleboard:~# g++ --version
g++ (GCC) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
After much trouble I cross-compiled a fully up-to-date version of ar (i thing the one on the board was outdated) and I got rid of BusyBox.
Now everything works as I expected.

Unable to find Foundation Header Files on Ubuntu

I have a Ubuntu server with Slicehost (now RackSpace) and am trying to get GNUstep installed so that I can compile Objective-c code.
After installing the world via apt-get and going through numerious blogs to try and get my source compiled, it now seems clear to me that I don't have the Foundation.h header files installed and I have no idea where to get these from.
They are present on my Mac, maybe I could simply copied them over to Ubuntu and it'll all be gravy - wishful thinking?
Any help on how to locate and install the Foundation.h files is appreciated.
In response to Andy's question
~: dpkg -l | grep -i gnustep
ii gnustep-back-common 0.12.0-1 The GNUstep GUI Backend - common files
ii gnustep-back0.12 0.12.0-1 The GNUstep GUI Backend
ii gnustep-back0.12-art 0.12.0-1 The GNUstep GUI Backend
ii gnustep-base-common 1.14.1-2ubuntu1 GNUstep Base library - common files
ii gnustep-base-runtime 1.14.1-2ubuntu1 GNUstep Base library
ii gnustep-common 2.0.2-1 Common files for the core GNUstep environmen
ii gnustep-core 6 The GNUstep Development Environment -- core
ii gnustep-devel 6 The GNUstep Development Environment -- devel
ii gnustep-gpbs 0.12.0-1 The GNUstep PasteBoard Server
ii gnustep-gui-common 0.12.0-3ubuntu1 GNUstep GUI Library - common files
ii gnustep-gui-runtime 0.12.0-3ubuntu1 GNUstep GUI Library - runtime files
ii gnustep-make 2.0.2-1 Basic GNUstep Makefiles
ii gorm.app 1.2.2-1 Visual Interface Builder for GNUstep
ii libgnustep-base1.14 1.14.1-2ubuntu1 GNUstep Base library
ii libgnustep-gui0.12 0.12.0-3ubuntu1 GNUstep GUI Library
ii projectcenter.app 0.4.3-3ubuntu1 IDE for GNUstep Development
ii projectmanager.app 0.2-3 Simple IDE for GNUstep
Answer to 2nd question.
~: sudo apt-get install libgnustep-base-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
libgnustep-base-dev: Depends: libxslt1-dev but it is not going to be installed
E: Broken packages
Which version of Ubuntu server are you running?
I'm running Ubuntu server 10.04 LTS and found my Foundation.h under /usr/include/GNUstep/Foundation/Foundation.h, it belongs to the package libgnustep-base-dev. Might be different in other versions...
Maybe you could post your output of dpkg -l | grep -i gnustep to compare our lists.
root#scm ~ # cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04.4 LTS"
root#scm ~ # locate Foundation.h
/usr/include/GNUstep/Foundation/Foundation.h
root#scm ~ # ls -l /usr/include/GNUstep/Foundation/Foundation.h
-rw-r--r-- 1 root root 4991 2009-08-31 23:45 /usr/include/GNUstep/Foundation/Foundation.h
root#scm ~ # dpkg -S /usr/include/GNUstep/Foundation/Foundation.h
libgnustep-base-dev: /usr/include/GNUstep/Foundation/Foundation.h
root#scm ~ # dpkg -l | grep -i gnustep
ii gnustep-back-common 0.16.0-3 The GNUstep GUI Backend - common files
ii gnustep-back-doc 0.16.0-3 The GNUstep GUI Backend documentation
ii gnustep-back0.16 0.16.0-3 The GNUstep GUI Backend
ii gnustep-back0.16-art 0.16.0-3 The GNUstep GUI Backend
ii gnustep-base-common 1.19.3-1ubuntu1 GNUstep Base library - common files
ii gnustep-base-doc 1.19.3-1ubuntu1 Documentation for the GNUstep Base Library
ii gnustep-base-runtime 1.19.3-1ubuntu1 GNUstep Base library
ii gnustep-common 2.2.0-1 Common files for the core GNUstep environmen
ii gnustep-core-devel 7.4 The GNUstep Development Environment -- core
ii gnustep-core-doc 7.4 The GNUstep Development Environment -- core
ii gnustep-devel 7.4 The GNUstep Development Environment -- devel
ii gnustep-gpbs 0.16.0-3 The GNUstep PasteBoard Server
ii gnustep-gui-common 0.16.0-2build1 GNUstep GUI Library - common files
ii gnustep-gui-doc 0.16.0-2build1 Documentation for the GNUstep GUI Library
ii gnustep-gui-runtime 0.16.0-2build1 GNUstep GUI Library - runtime files
ii gnustep-make 2.2.0-1 Basic GNUstep Makefiles
ii gnustep-make-doc 2.2.0-1 Documentation for GNUstep-make
ii gorm.app 1.2.8-1ubuntu0.1 Visual Interface Builder for GNUstep
ii libgnustep-base-dev 1.19.3-1ubuntu1 GNUstep Base header files and development li
ii libgnustep-base1.19 1.19.3-1ubuntu1 GNUstep Base library
ii libgnustep-gui-dev 0.16.0-2build1 GNUstep GUI header files and static librarie
ii libgnustep-gui0.16 0.16.0-2build1 GNUstep GUI Library
ii librenaissance0 0.9.0-2build2 GNUstep GUI Framework - library files
ii librenaissance0-dev 0.9.0-2build2 GNUstep GUI Framework - development file
ii projectcenter.app 0.5.0~20080704-1build1 IDE for GNUstep Development
root#scm ~ #