LoginSignup
0
0

Posix Test Suite docker downloads, tar, install。docker(110)

Last updated at Posted at 2019-10-01

PCTS:151-2, POSIX Test Suite
https://www.itl.nist.gov/div897/ctg/posix_form.htm

macOS
$ docker run -v /Users/ogawakiyoshi/work:/Users/ogawakiyoshi/work -it gcc /bin/bash

「/Users/administrator/work」は、host OS側の存在するフォルダ名を指定する。

ubuntu
# apt update; apt -y upgrade ; apt install -y wget vim sudo apt-utils 
# wget http://www.itl.nist.gov/div897/ctg/suites/NP_distr.Z.exe
# wget http://www.itl.nist.gov/div897/ctg/suites/CVR.ps
# wget http://www.itl.nist.gov/div897/ctg/suites/ITG.ps

Guide

NIST-PCTS:151-2 Installation and Testing Guide October 1, 1995

Utilities - NIST-PCTS:151-2 requires the following utilities: • ar or a compatible library archiver;
• grep or a compatible pattern retriever,
• cc -E or a compatible macro preprocessor,
• extended cpio creating and reading utility to read the NIST-PCTS:151-2 distribution and create an extended cpio archive;
• extended tar format creating and reading utility to read and create an extended tar archive; • mkdir or a compatible directory maker;
• mknod or a compatible special file builder;
• mv or a compatible file mover;
• ranlib, or the System V ar/ld combination;
• rm or a compatible file remover;
• rm -r -f or a compatible directory tree remover;

docker/ubuntu
# mv NP_distr.Z.exe NP_distr.Z   
# # uncompress -v NP_distr.Z 
NP_distr.Z:	 69.9% -- replaced with NP_distr
# cd NIST-PCTS/

1. Execute: umask 0

bash
# cd ./src/install
# ./s_install 
# cd ../..
# ./bin/install ./scripts/utilities 
		NIST-PCTS:151-2, Version 1.8, 10/1/95


src/tools		Oct  1 12:54:25 2019
  ./sv_cmd
	c89 -c -I/home/work/NIST-PCTS/include sv_cmdcom.c

...

sv_expect.c:46:24: warning: 'char' is promoted to 'int' when passed through '...'
   46 |   c_saved = va_arg(ap, char);
      |                        ^
...
	z_gets.c: In function 'Zgets':
z_gets.c:59:2: warning: 'gets' is deprecated [-Wdeprecated-declarations]
   59 |  ret_val = gets(s);
      |  ^~~~~~~

# mv journal util_inst_rep
# ./bin/install ./scripts/NIST-PCTS 

		NIST-PCTS:151-2, Version 1.8, 10/1/95

STD/DEF		Oct  1 12:55:52 2019
  ./src/gen_terms
	c89 -c -I/home/work/NIST-PCTS/include gen_terms.c

...

	/usr/bin/ld: errno: TLS definition in //lib/x86_64-linux-gnu/libc.so.6 section .tbss mismatches non-TLS reference in 2.4_01.o
/usr/bin/ld: //lib/x86_64-linux-gnu/libc.so.6: error adding symbols: bad value
collect2: error: ld returned 1 exit status

	ERROR
	Command exited with an error.

...

	MESSAGE
	3.1.2_05x.c: In function 'main':
3.1.2_05x.c:136:18: warning: comparison between pointer and zero character constant [-Wpointer-compare]
  136 |    if(environ[2] != '\000')
      |                  ^~
3.1.2_05x.c:136:7: note: did you mean to dereference the pointer?
  136 |    if(environ[2] != '\000')
      |       ^

...

	MESSAGE
	3.1.2_38.c: In function 'main':
3.1.2_38.c:38:26: error: dereferencing pointer to incomplete type 'DIR' {aka 'struct __dirstream'}
   38 |      Zwrite(fd, (DIR *)&(*dirp), sizeof(DIR));
      |                          ^~~~~
3.1.2_38.c:38:41: error: invalid application of 'sizeof' to incomplete type 'DIR' {aka 'struct __dirstream'}
   38 |      Zwrite(fd, (DIR *)&(*dirp), sizeof(DIR));
      |                                         ^~~

	ERROR
	Command exited with an error.
	c89 -o ../../bin/3.1.2_38 3.1.2_38.o  /home/work/NIST-PCTS/lib/sv_tools.a /home/work/NIST-PCTS/lib/sv_base.a /home/work/NIST-PCTS/lib/sv_sys.a /home/work/NIST-PCTS/lib/tssf.a  /home/work/NIST-PCTS/lib/tssf.a 
	MESSAGE
	gcc: error: 3.1.2_38.o: No such file or directory

最後にdocker hubに掲載した。

macOS
$ docker push kaizenjapan/posix

利用方法

macOS
 docker run -v /Users/administrator/work:/home/work -it kaizenjapan/posix /bin/bash

なお/Users/administrator/workはhost OS側に存在するフォルダを指定すること。

報告(report)

tarがうまくいかなかった記録はこちら。

今日のdocker error: tar, wget

powershellで解凍がうまくいかなかった記録はこちら。

Posix Test Suite 解凍方法(Windows power shell版)
https://qiita.com/kaizen_nagoya/items/57ee061892bc9afcf860

docker: Error response from daemon: error while creating mount source path 今日のdocker error

文書履歴(document history)

ver. 0.01 初稿 20191001
ver. 0.02 加筆 20220919

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

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

Thank you very much for reading to the last sentence.

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

0
0
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
0