编译环境:CentOS7.4
做过开发环境,应该是装过部分依赖库
# ./configure --prefix=/root/output/gsoap
# make
报错
../../ylwrap: line 176: yacc: command not found
因该似乎却什么命令
网上所,需要装上这个命令
# yum install -y yacc
找不到,好尴尬
No package yacc available.
Error: Nothing to do
搜一下
$ yum search yacc
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
================================================================================ N/S matched: yacc ================================================================================
byacc.x86_64 : Berkeley Yacc, a parser generator
byaccj.x86_64 : Parser Generator with Java Extension
python-ply.noarch : Python Lex-Yacc
有个叫byacc的,不知道是不是一个东西
网上还说,有一个叫bison好像也是这个东西
$ yum search bison
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
=============================================================================== N/S matched: bison ================================================================================
bison-devel.i686 : -ly library for development using Bison-generated parsers
bison-devel.x86_64 : -ly library for development using Bison-generated parsers
bison-runtime.x86_64 : Runtime support files used by Bison-generated parsers
bison.x86_64 : A GNU general-purpose parser generator
孩子才做选择,成年人"我都要"
# yum install -y byacc
# yacc -V
yacc - 1.9 20130304
# which yacc
/usr/bin/yacc
# md5sum /usr/bin/yacc
723b4b514f4a2c7b1de05cd5142a5ef0 /usr/bin/yacc
# yum install -y bison
# yacc -V
yacc - 1.9 20130304
# which yacc
/usr/bin/yacc
# md5sum /usr/bin/yacc
723b4b514f4a2c7b1de05cd5142a5ef0 /usr/bin/yacc
好像bision没用,不管了,一个软件能占多少空间
# make
报错
WARNING: 'flex' is missing on your system.
是不是应该看一下官方文档,但是懒得看看,继续装
# root @ localhost in ~/workspace/gsoap-2.8 [13:46:12] C:2
$ yum search flex
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
================================================================================ N/S matched: flex ================================================================================
flex-devel.i686 : Libraries for flex scanner generator
flex-devel.x86_64 : Libraries for flex scanner generator
flex-doc.x86_64 : Documentation for flex scanner generator
jflex-javadoc.noarch : API documentation for jflex
flex.x86_64 : A tool for creating scanners (text pattern recognizers)
jflex.noarch : Fast Scanner Generator
perl-Test-Deep.noarch : Extremely flexible deep comparison
python-sqlalchemy.x86_64 : Modular and flexible ORM library for python
texlive-geometry.noarch : Flexible and complete interface to document dimensions
texlive-natbib.noarch : Flexible bibliography support
Name and summary matches only, use "search all" for everything.
# yum install -y flex flex-devel
# make
报错
gcc -std=gnu11 -DHAVE_CONFIG_H -I. -I../.. -DWITH_YACC -DWITH_LEX -DSOAPCPP2_IMPORT_PATH="\"/root/output/gsoap/share/gsoap/import\"" -DLINUX -g -O2 -MT soapcpp2-soapcpp2_lex.o -MD -MP -MF .deps/soapcpp2-soapcpp2_lex.Tpo -c -o soapcpp2-soapcpp2_lex.o `test -f 'soapcpp2_lex.c' || echo './'`soapcpp2_lex.c
gcc: error: ./soapcpp2_lex.c: No such file or directory
gcc: fatal error: no input files
扯淡,文件找不到
find . -name "soapcpp2_lex.c"
就是没有这个文件,可能是生成的中心源代码文件,重新搞一下configure
# make
没报错
# make install
安装完成
# root @ localhost in ~/output/gsoap [13:57:46]
$ tree -L 2
.
├── bin
│ ├── soapcpp2
│ └── wsdl2h
├── include
│ └── stdsoap2.h
├── lib
│ ├── libgsoap.a
│ ├── libgsoap++.a
│ ├── libgsoapck.a
│ ├── libgsoapck++.a
│ ├── libgsoapssl.a
│ ├── libgsoapssl++.a
│ └── pkgconfig
└── share
└── gsoap
# ./soapcpp2 -h
Usage: soapcpp2 [-0|-1|-2] [-C|-S|-CS] [-A] [-a] [-b] [-c|-c++|-c++11|-c++14|-c++17] [-d path] [-Ec] [-Ed] [-Et] [-e] [-f N] [-g] [-h] [-i] [-I path:path:...] [-L] [-l] [-m] [-n] [-p name] [-Q name] [-q name] [-r] [-s] [-T] [-t] [-u] [-V] [-v] [-w] [-x] [-y] [-z#] [infile]
-0 no SOAP, generate REST source code
-1 generate SOAP 1.1 source code
-2 generate SOAP 1.2 source code
-A require HTTP SOAPAction headers to invoke server-side operations
-a use HTTP SOAPAction with WS-Addressing to invoke server-side operations
-b serialize byte arrays char[N] as string
-C generate client-side source code only
-c generate C source code
-c++ generate C++ source code (default)
-c++11 generate C++ source code optimized for C++11 (compile with -std=c++11)
-c++14 generate C++ source code optimized for C++14 (compile with -std=c++14)
-c++17 generate C++ source code optimized for C++17 (compile with -std=c++17)
-dpath use path to save files
-Ec generate extra functions for deep copying
-Ed generate extra functions for deep deletion
-Et generate extra functions for data traversals with callback functions
-e generate SOAP RPC encoding style bindings (also use -1 or -2)
-fN multiple soapC files, with N serializer definitions per file (N>=10)
-g generate XML sample messages in template format for testmsgr
-h display help info and exit
-Ipath use path(s) for #import (paths separated with ':')
-i generate C++ service proxies and objects inherited from soap struct
-j generate C++ service proxies and objects that share a soap struct
-L don't generate soapClientLib/soapServerLib
-l generate linkable modules (experimental)
-m generate source code for the Matlab(tm) MEX compiler (deprecated)
-n use service name to rename service functions and namespace table
-pname save files with new prefix name instead of 'soap'
-Qname use name as the C++ namespace, including custom serializers
-qname use name as the C++ namespace, excluding custom serializers
-r generate soapReadme.md report
-S generate server-side source code only
-s generate stub and skeleton functions with strict XML validation checks
-T generate server auto-test source code
-t generate source code for fully xsi:type typed SOAP/XML messages
-u uncomment WSDL/schema output by suppressing XML comments
-V display the current version and exit
-v verbose output
-w don't generate WSDL and schema files
-x don't generate sample XML message files
-y include C/C++ type access information in sample XML messages
-z1 compatibility: generate old-style C++ service proxies and objects
-z2 compatibility with 2.7.x: omit XML output for NULL pointers
-z3 compatibility up to 2.8.30: _param_N indexing and nillable pointers
-z4 compatibility up to 2.8.105: char* member defaults, even when omitted
infile header file to parse (if none reads stdin)
# ./wsdl2h -h
Usage: wsdl2h [-a] [-b] [-c|-c++|-c++11|-c++14|-c++17] [-D] [-d] [-e] [-F] [-f] [-g] [-h] [-I path] [-i] [-j] [-k] [-L] [-l] [-M] [-m] [-N name] [-n name] [-O1|-O2|-O3|-O4|-Ow2|-Ow3|-Ow4] [-P|-p] [-Q] [-q name] [-R] [-r proxyhost[:port[:uid:pwd]]] [-r:uid:pwd] [-Sname] [-s] [-T] [-t typemapfile] [-U] [-u] [-V] [-v] [-w] [-W] [-x] [-y] [-z#] [-_] [-o outfile.h] infile.wsdl infile.xsd http://www... ...
-a generate indexed struct names for local elements with anonymous types
-b bi-directional operations (duplex ops) added to serve one-way responses
-c generate C source code
-c++ generate C++ source code (default)
-c++11 generate C++11 source code
-c++14 generate C++14 source code
-c++17 generate C++17 source code
-D make attribute members with default/fixed values optional with pointers
-d use DOM to populate xs:any, xs:anyType, and xs:anyAttribute
-e don't qualify enum names
-F add transient members to structs to simulate struct-type derivation in C
-f generate flat C++ class hierarchy by removing inheritance
-g generate global top-level element and attribute declarations
-h display help info and exit
-Ipath use path to locate WSDL and XSD files
-i don't import (advanced option)
-j don't generate SOAP_ENV__Header and SOAP_ENV__Detail definitions
-k don't generate SOAP_ENV__Header mustUnderstand qualifiers
-L generate less documentation by removing generic @note comments
-l display license information
-M suppress error "must understand element with wsdl:required='true'"
-m use xsd.h module to import primitive types
-Nname use name for service prefixes to produce a service for each binding
-nname use name as the base namespace prefix instead of 'ns'
-O1 optimize by omitting duplicate choice/sequence members
-O2 optimize -O1 and omit unused schema types (unreachable from roots)
-O3 optimize -O2 and omit unused schema root attributes
-O4 optimize -O3 and omit unused schema root elements (use only with WSDLs)
-Ow2 optimize -O2 while retaining all derived types of used base types
-Ow3 optimize -O3 while retaining all derived types of used base types
-Ow4 optimize -O4 while retaining all derived types of used base types
-ofile output to file
-P don't create polymorphic types inherited from xsd__anyType
-p create polymorphic types inherited from base xsd__anyType
-Q make xsd__anySimpleType equal to xsd__anyType to use as the base type
-qname use name for the C++ namespace of all declarations
-R generate REST operations for REST bindings specified in a WSDL
-rhost[:port[:uid:pwd]]
connect via proxy host, port, and proxy credentials uid and pwd
-r:uid:pwd
connect with authentication credentials uid and pwd
-Sname use name instead of 'soap' for the C++ class members with soap contexts
-s don't generate STL code (no std::string and no std::vector)
-tfile use type map file instead of the default file typemap.dat
-U allow UTF-8-encoded Unicode C/C++ identifiers when mapping XML tag names
-u don't generate unions
-V display the current version and exit
-v verbose output
-W suppress warnings
-w always wrap response parameters in a response struct (<=1.1.4 behavior)
-X don't qualify part names to disambiguate doc/lit wrapped patterns
-x don't generate _XML any/anyAttribute extensibility elements
-y generate typedef synonyms for structs and enums
-z1 compatibility with 2.7.6e: generate pointer-based arrays
-z2 compatibility with 2.7.7-2.7.15: (un)qualify element/attribute refs
-z3 compatibility with 2.7.16-2.8.7: (un)qualify element/attribute refs
-z4 compatibility up to 2.8.11: don't generate union structs in std::vector
-z5 compatibility up to 2.8.15: don't include minor improvements
-z6 compatibility up to 2.8.17: don't include minor improvements
-z7 compatibility up to 2.8.59: don't generate std::vector of class of union
-z8 compatibility up to 2.8.74: don't gen quals for doc/lit wrapped patterns
-z9 compatibility up to 2.8.93: always qualify element/attribute refs
-z10 compatibility up to 2.8.96: gen quals even when defined w/o namespace
-_ don't generate _USCORE (replace with Unicode code point _x005f)
infile.wsdl infile.xsd http://www... list of input sources (if none reads stdin)