0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

g++ clang++ をdockerでerror(142)中 C++(102)

Last updated at Posted at 2019-07-09

docker gcc(g++) and llvm(clang++)
https://qiita.com/kaizen_nagoya/items/059874ea39c4de64c0f7

docker and vscode not visual studio code
https://qiita.com/kaizen_nagoya/items/165a281570a8c62ca50a

g++

macOS
$ docker run -it gcc /bin/bash
Unable to find image 'gcc:latest' locally
latest: Pulling from library/gcc
6f2f362378c5: Pull complete 
494c27a8a6b8: Pull complete 
7596bb83081b: Pull complete 
372744b62d49: Pull complete 
615db220d76c: Pull complete 
dd1e0ba56aac: Pull complete 
b4c62fab8fa1: Pull complete 
df32917a83ac: Pull complete 
5100809ee8fa: Pull complete 
Digest: sha256:f46393c64e0e5a98aff814fec705582a08c3d8067196857910036ed324242ceb
Status: Downloaded newer image for gcc:latest

clang++/llvm

docker/ubuntu
# apt update; apt -y upgrade

# apt install clang+ 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  binfmt-support clang-3.8 libclang-common-3.8-dev libclang1-3.8 libgc1c2
  libjsoncpp1 libllvm3.8 libobjc-6-dev libobjc4 libpipeline1 llvm-3.8
  llvm-3.8-dev llvm-3.8-runtime
Suggested packages:
  gnustep gnustep-devel clang-3.8-doc llvm-3.8-doc
The following NEW packages will be installed:
  binfmt-support clang clang-3.8 libclang-common-3.8-dev libclang1-3.8
  libgc1c2 libjsoncpp1 libllvm3.8 libobjc-6-dev libobjc4 libpipeline1 llvm-3.8
  llvm-3.8-dev llvm-3.8-runtime
0 upgraded, 14 newly installed, 0 to remove and 0 not upgraded.
Need to get 58.0 MB of archives.

#vscode
Ubuntu / DebianにコマンドでVSCode (Visual Studio Code) をインストールする方法
https://www.karelie.net/ubuntu-debian-command-install-vscode/

docker/ubuntu
# curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   983  100   983    0     0   1644      0 --:--:-- --:--:-- --:--:--  1646

# install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
root@7a86e7a198a9:/# sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'

# apt install apt-transport-https

# apt update
Hit:1 http://security.debian.org/debian-security stretch/updates InRelease
Ign:2 http://deb.debian.org/debian stretch InRelease
Hit:3 http://deb.debian.org/debian stretch-updates InRelease
Hit:4 http://deb.debian.org/debian stretch Release 
Get:6 https://packages.microsoft.com/repos/vscode stable InRelease [3181 B]
Get:7 https://packages.microsoft.com/repos/vscode stable/main amd64 Packages [126 kB]
Fetched 129 kB in 0s (131 kB/s)    
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.

# apt install code
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  adwaita-icon-theme at-spi2-core dconf-gsettings-backend dconf-service
  glib-networking glib-networking-common glib-networking-services
  gsettings-desktop-schemas libatk-bridge2.0-0 libatspi2.0-0 libcolord2
  libdconf1 libdrm2 libegl1-mesa libepoxy0 libgbm1 libgtk-3-0 libgtk-3-bin
  libgtk-3-common libjson-glib-1.0-0 libjson-glib-1.0-common libnotify4
  libnspr4 libnss3 libproxy1v5 librest-0.7-0 libsecret-1-0 libsecret-common
  libsoup-gnome2.4-1 libsoup2.4-1 libwayland-client0 libwayland-cursor0
  libwayland-egl1-mesa libwayland-server0 libx11-xcb1 libxcb-dri2-0
  libxcb-dri3-0 libxcb-present0 libxcb-sync1 libxcb-xfixes0 libxkbcommon0
  libxkbfile1 libxshmfence1 libxss1 libxtst6 notification-daemon xkb-data
Suggested packages:
  colord gvfs
The following NEW packages will be installed:
  adwaita-icon-theme at-spi2-core code dconf-gsettings-backend dconf-service
  glib-networking glib-networking-common glib-networking-services
  gsettings-desktop-schemas libatk-bridge2.0-0 libatspi2.0-0 libcolord2
  libdconf1 libdrm2 libegl1-mesa libepoxy0 libgbm1 libgtk-3-0 libgtk-3-bin
  libgtk-3-common libjson-glib-1.0-0 libjson-glib-1.0-common libnotify4
  libnspr4 libnss3 libproxy1v5 librest-0.7-0 libsecret-1-0 libsecret-common
  libsoup-gnome2.4-1 libsoup2.4-1 libwayland-client0 libwayland-cursor0
  libwayland-egl1-mesa libwayland-server0 libx11-xcb1 libxcb-dri2-0
  libxcb-dri3-0 libxcb-present0 libxcb-sync1 libxcb-xfixes0 libxkbcommon0
  libxkbfile1 libxshmfence1 libxss1 libxtst6 notification-daemon xkb-data
0 upgraded, 48 newly installed, 0 to remove and 0 not upgraded.
Need to get 77.3 MB of archives.

Effective ModernC++をclang++, g++でコンパイルしてみる
https://qiita.com/kaizen_nagoya/items/2fafaf28782d192e237e

# apt install vim sudo cmake wget
# wget https://github.com/BartVandewoestyne/Effective-Modern-Cpp/archive/master.zip
# unzip msdyrt.xip
# cd Effective-Modern-Cpp-master
# cmake CMakeLists.txt 
-- The C compiler identification is GNU 9.1.0
-- The CXX compiler identification is Clang 3.8.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
CMake Error at /usr/share/cmake-3.7/Modules/FindBoost.cmake:1831 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  Item04_Know_how_to_view_deduced_types/CMakeLists.txt:8 (find_package)


CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Boost_INCLUDE_DIR (ADVANCED)
   used as include directory in directory /tmp/Effective-Modern-Cpp-master/Item04_Know_how_to_view_deduced_types
   used as include directory in directory /tmp/Effective-Modern-Cpp-master/Item04_Know_how_to_view_deduced_types
   used as include directory in directory /tmp/Effective-Modern-Cpp-master/Item04_Know_how_to_view_deduced_types
   used as include directory in directory /tmp/Effective-Modern-Cpp-master/Item04_Know_how_to_view_deduced_types
   used as include directory in directory /tmp/Effective-Modern-Cpp-master/Item04_Know_how_to_view_deduced_types
   used as include directory in directory /tmp/Effective-Modern-Cpp-master/Item04_Know_how_to_view_deduced_types

-- Configuring incomplete, errors occurred!
See also "/tmp/Effective-Modern-Cpp-master/CMakeFiles/CMakeOutput.log".
See also "/tmp/Effective-Modern-Cpp-master/CMakeFiles/CMakeError.log".

原因調査中。

ubuntu/docker
# code -h
You are trying to start vscode as a super user which is not recommended. If you really want to, you must specify an alternate user data directory using the --user-data-dir argument.
# code --user-data-dir  /tmp
/usr/share/code/bin/../code: error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory

Ethernet 記事一覧 Ethernet(0)
https://qiita.com/kaizen_nagoya/items/88d35e99f74aefc98794

Wireshark 一覧 wireshark(0)、Ethernet(48)
https://qiita.com/kaizen_nagoya/items/fbed841f61875c4731d0

線網(Wi-Fi)空中線(antenna)(0) 記事一覧(118/300目標)
https://qiita.com/kaizen_nagoya/items/5e5464ac2b24bd4cd001

C++ Support(0) 
https://qiita.com/kaizen_nagoya/items/8720d26f762369a80514

Coding Rules(0) C Secure , MISRA and so on
https://qiita.com/kaizen_nagoya/items/400725644a8a0e90fbb0

Autosar Guidelines C++14 example code compile list(1-169)
https://qiita.com/kaizen_nagoya/items/8ccbf6675c3494d57a76

Error一覧(C/C++, python, bash...) Error(0)
https://qiita.com/kaizen_nagoya/items/48b6cbc8d68eae2c42b8

なぜdockerで機械学習するか 書籍・ソース一覧作成中 (目標100)
https://qiita.com/kaizen_nagoya/items/ddd12477544bf5ba85e2

言語処理100本ノックをdockerで。python覚えるのに最適。:10+12
https://qiita.com/kaizen_nagoya/items/7e7eb7c543e0c18438c4

プログラムちょい替え(0)一覧:4件
https://qiita.com/kaizen_nagoya/items/296d87ef4bfd516bc394

一覧の一覧( The directory of directories of mine.) Qiita(100)
https://qiita.com/kaizen_nagoya/items/7eb0e006543886138f39

プログラマが知っていると良い「公序良俗」
https://qiita.com/kaizen_nagoya/items/9fe7c0dfac2fbd77a945

小川清最終講義、小川清最終講義(再)計画, Ethernet(100) 英語(100) 安全(100)
https://qiita.com/kaizen_nagoya/items/e2df642e3951e35e6a53

最後までおよみいただきありがとうございました。

いいね 💚、フォローをお願いします。

Thank you very much for reading to the last sentence.

Please press the like icon 💚 and follow me for your happy life.

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?