I'm trying to migrate a project to autotools, got stuck with integrating the third party libraries we use. Some work the basic way: (the following is in my configure.ac)
AC_CONFIG_SUBDIRS([thirdparty/sqlite])
AC_CONFIG_SUBDIRS([thirdparty/protobuf])
But readline doesn't:
AC_CONFIG_SUBDIRS([thirdparty/readline])
When I try autoreconf, I get this error:
brett#Brett-Thinkpad:~/auto3$ autoreconf
autoheader: warning: missing template: CTYPE_NON_ASCII
autoheader: Use AC_DEFINE([CTYPE_NON_ASCII], [], [Description])
autoheader: warning: missing template: FIONREAD_IN_SYS_IOCTL
autoheader: warning: missing template: HAVE_BSD_SIGNALS
autoheader: warning: missing template: HAVE_GETPW_DECLS
autoheader: warning: missing template: HAVE_LANGINFO_CODESET
autoheader: warning: missing template: HAVE_MBRLEN
autoheader: warning: missing template: HAVE_MBSCMP
autoheader: warning: missing template: HAVE_MBSNRTOWCS
autoheader: warning: missing template: HAVE_MBSRTOWCS
autoheader: warning: missing template: HAVE_MBSTATE_T
autoheader: warning: missing template: HAVE_POSIX_SIGNALS
autoheader: warning: missing template: HAVE_POSIX_SIGSETJMP
autoheader: warning: missing template: HAVE_STRUCT_DIRENT_D_FILENO
autoheader: warning: missing template: HAVE_STRUCT_DIRENT_D_INO
autoheader: warning: missing template: HAVE_USG_SIGHOLD
autoheader: warning: missing template: HAVE_WCRTOMB
autoheader: warning: missing template: HAVE_WCSCOLL
autoheader: warning: missing template: HAVE_WCSDUP
autoheader: warning: missing template: HAVE_WCTYPE
autoheader: warning: missing template: HAVE_WCWIDTH
autoheader: warning: missing template: MUST_REINSTALL_SIGHANDLERS
autoheader: warning: missing template: NO_MULTIBYTE_SUPPORT
autoheader: warning: missing template: SPEED_T_IN_SYS_TYPES
autoheader: warning: missing template: STRCOLL_BROKEN
autoheader: warning: missing template: STRUCT_WINSIZE_IN_SYS_IOCTL
autoheader: warning: missing template: STRUCT_WINSIZE_IN_TERMIOS
autoheader: warning: missing template: TIOCSTAT_IN_SYS_IOCTL
autoheader: warning: missing template: VOID_SIGHANDLER
autoreconf: /usr/bin/autoheader failed with exit status: 1
The Readline source appears to be organized in the same way as SQLite and Protobuf - ./configure && make && make install works the same for all three. What's different about readline? (I'm using Readline version 6.2)
(Sorry if this is basic...I'm just getting started with Autotools)
I'm not familiar with the readline sources, but I'd guess that either you or readline are using an obsolete version of the autotools. That doesn't stop ./configure && make && make install from working, since when you download the tarball you get the configure and Makefiles that the incompatibly-versioned autotools have already generated. But it does mean you can't generate new ones with your version of autotools.
You can probably fix it by just doing what the error message tells you: add a whole bunch of lines like
AC_DEFINE([CTYPE_NON_ASCII], [], [Description])
to thirdparty/readline/configure.ac. Or upgrade to the latest autotools if the problem is on your end.
For more specific and effective advice, include the offending configure.ac in your question and tell us the version of autotools you're using.
Related
I'm trying to write C++ project with conan. I need to use qt/6.2.2 as dependency.
After I run
conan create . user/test
It comes out a long error message. The last few lines are:
/home/run/.conan/data/qt/6.2.2/_/_/package/e1b261f6f4c131503719b972012039d1853778f9/include/QtCore/qarraydatapointer.h:374:27: note: deduced conflicting types for parameter ‘const T’ (‘int’ and ‘qsizetype’ {aka ‘long long int’})
374 | ? n + qMax(0, (header->alloc - from.size - n) / 2)
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/Wuziqi.dir/build.make:63: CMakeFiles/Wuziqi.dir/Wuziqi.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/Wuziqi.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
Wuziqi/1.0.0#user/test:
Wuziqi/1.0.0#user/test: ERROR: Package '702f20c11c28f19fd5e1d929272b0f47e81fec21' build failed
Wuziqi/1.0.0#user/test: WARN: Build folder /home/run/.conan/data/Wuziqi/1.0.0/user/test/build/702f20c11c28f19fd5e1d929272b0f47e81fec21
ERROR: Wuziqi/1.0.0#user/test: Error in build() method, line 26
cmake.build()
ConanException: Error 2 while executing cmake --build '/home/run/.conan/data/Wuziqi/1.0.0/user/test/build/702f20c11c28f19fd5e1d929272b0f47e81fec21' '--' '-j12'
There are multiple errors in the middle, like:
error: ‘is_integral_v’ is not a member of ‘std’; did you mean ‘is_integral’?
170 | template <typename Int> std::enable_if_t<std::is_integral_v<Int>, iterator>
error: ‘compare_eq_result_container’ in namespace ‘QTypeTraits’ does not name a template type
306 | QTypeTraits::compare_eq_result_container<QList, U> operator==(const QList &other) const
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’?
285 | if constexpr (std::is_same_v<std::decay_t<InputIterator>, iterator> ||
| ^~~~~~~~~
| is_same
Does it seem that there is no xxx_v in std?
How could I fix it?
Thanks, guys, I solved this problem.
It is because of the version of dependencies, just like #康桓瑋 said, I need to use C++17.
However, C++17 will lead to other conflicts. So I set
requires = "qt/5.15.2"
in conanfile.py instead of the latest version.
My goal here is simple: I want a custom c++ toolchain where I can specify my own compilers and compiler options. I have boiled down my current issue into a contrived example repo here: http://github.com/btmcg/bazel_toolchain
I followed the tutorial described at https://docs.bazel.build/versions/main/tutorial/cc-toolchain-config.html to use my custom built version of gcc. This seems to work okay until I add a cc_proto_library. Bazel appears to use my custom toolchain to build protoc/zlib and errors out because of the warning flags I have in my custom toolchain. I was under the impression that --host_crosstool_top=#bazel_tools//tools/cpp:toolchain would tell Bazel to ignore my custom toolchain, however that doesn't seem to be the case. I would expect it to use /bin/gcc and not my custom gcc or warnings. Any help would be appreciated
Here is where the build currently fails:
$ bazel build --config=gcc_config //main:hello-world --verbose_failures
INFO: Analyzed target //main:hello-world (0 packages loaded, 0 targets configured).
INFO: Found 1 target... ERROR: /home/brian/.cache/bazel/_bazel_brian/2fc228b5a7b1bf0ef87f3ee9353aa72d/external/com_google_protobuf/BUILD:155:11: Compiling src/google/protobuf/extension_set.cc failed: (Exit 1): gcc failed: error executing command
(cd /home/brian/.cache/bazel/_bazel_brian/2fc228b5a7b1bf0ef87f3ee9353aa72d/sandbox/linux-sandbox/404/execroot/__main__ && \
exec env - \
LD_LIBRARY_PATH=/home/brian/.local/lib64:/home/brian/.local/lib \
PATH=/home/brian/.local/tools/bazel/4.2.2/bin:/home/brian/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl \
PWD=/proc/self/cwd \
/opt/custom/gcc/11.2.0/bin/gcc -MD -MF bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_objs/protobuf_lite/extension_set.d '-frandom-seed=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_objs/protobuf_lite/extension_set.o' -iquote external/com_google_protobuf -iquote bazel-out/k8-fastbuild/bin/external/com_google_protobuf -isystem external/com_google_protobuf/src -isystem bazel-out/k8-fastbuild/bin/external/com_google_protobuf/src -xc++ -Werror -Wswitch-default -DHAVE_ZLIB -Wmissing-field-initializers -Woverloaded-virtual -Wno-sign-compare -c external/com_google_protobuf/src/google/protobuf/extension_set.cc -o bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_objs/protobuf_lite/extension_set.o)
Execution platform: #local_config_platform//:host
Use --sandbox_debug to see verbose messages from the sandbox
external/com_google_protobuf/src/google/protobuf/extension_set.cc: In function 'bool google::protobuf::internal::{anonymous}::is_packable(google::protobuf::internal::WireFormatLite::WireType)':
external/com_google_protobuf/src/google/protobuf/extension_set.cc:72:10: error: switch missing default case [-Werror=switch-default]
72 | switch (type) {
| ^
external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'void* google::protobuf::internal::ExtensionSet::MutableRawRepeatedField(int, google::protobuf::internal::FieldType, bool, const google::protobuf::FieldDescriptor*)':
external/com_google_protobuf/src/google/protobuf/extension_set.cc:419:12: error: switch missing default case [-Werror=switch-default]
419 | switch (WireFormatLite::FieldTypeToCppType(
| ^
external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'void google::protobuf::internal::ExtensionSet::RemoveLast(int)':
external/com_google_protobuf/src/google/protobuf/extension_set.cc:855:10: error: switch missing default case [-Werror=switch-default]
855 | switch (cpp_type(extension->type)) {
| ^
external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'void google::protobuf::internal::ExtensionSet::SwapElements(int, int, int)':
external/com_google_protobuf/src/google/protobuf/extension_set.cc:910:10: error: switch missing default case [-Werror=switch-default]
910 | switch (cpp_type(extension->type)) {
| ^
external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'void google::protobuf::internal::ExtensionSet::InternalExtensionMergeFrom(const google::protobuf::MessageLite*, int, const google::protobuf::internal::ExtensionSet::Extension&, google::protobuf::Arena*)':
external/com_google_protobuf/src/google/protobuf/extension_set.cc:1008:12: error: switch missing default case [-Werror=switch-default]
1008 | switch (cpp_type(other_extension.type)) {
| ^
external/com_google_protobuf/src/google/protobuf/extension_set.cc:1055:14: error: switch missing default case [-Werror=switch-default]
1055 | switch (cpp_type(other_extension.type)) {
| ^
external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'bool google::protobuf::internal::ExtensionSet::ParseFieldWithExtensionInfo(int, bool, const google::protobuf::internal::ExtensionInfo&, google::protobuf::io::CodedInputStream*, google::protobuf::internal::FieldSkipper*)':
external/com_google_protobuf/src/google/protobuf/extension_set.cc:1322:12: error: switch missing default case [-Werror=switch-default]
1322 | switch (extension.type) {
| ^
external/com_google_protobuf/src/google/protobuf/extension_set.cc:1378:12: error: switch missing default case [-Werror=switch-default]
1378 | switch (extension.type) {
| ^
external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'void google::protobuf::internal::ExtensionSet::Extension::Clear()':
external/com_google_protobuf/src/google/protobuf/extension_set.cc:1612:12: error: switch missing default case [-Werror=switch-default]
1612 | switch (cpp_type(type)) {
| ^
external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'size_t google::protobuf::internal::ExtensionSet::Extension::ByteSize(int) const':
external/com_google_protobuf/src/google/protobuf/extension_set.cc:1660:14: error: switch missing default case [-Werror=switch-default]
1660 | switch (real_type(type)) {
| ^
external/com_google_protobuf/src/google/protobuf/extension_set.cc:1710:14: error: switch missing default case [-Werror=switch-default]
1710 | switch (real_type(type)) {
| ^
external/com_google_protobuf/src/google/protobuf/extension_set.cc:1751:12: error: switch missing default case [-Werror=switch-default]
1751 | switch (real_type(type)) {
| ^
external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'int google::protobuf::internal::ExtensionSet::Extension::GetSize() const':
external/com_google_protobuf/src/google/protobuf/extension_set.cc:1799:10: error: switch missing default case [-Werror=switch-default]
1799 | switch (cpp_type(type)) { | ^
external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'void google::protobuf::internal::ExtensionSet::Extension::Free()':
external/com_google_protobuf/src/google/protobuf/extension_set.cc:1825:12: error: switch missing default case [-Werror=switch-default]
1825 | switch (cpp_type(type)) {
| ^
external/com_google_protobuf/src/google/protobuf/extension_set.cc: In member function 'uint8_t* google::protobuf::internal::ExtensionSet::Extension::InternalSerializeFieldWithCachedSizesToArray(const google::protobuf::MessageLite*, const google::protobuf::internal::ExtensionSet*, int, uint8_t*, google::protobuf::io::EpsCopyOutputStream*) const':
external/com_google_protobuf/src/google/protobuf/extension_set.cc:2026:14: error: switch missing default case [-Werror=switch-default]
2026 | switch (real_type(type)) {
| ^
external/com_google_protobuf/src/google/protobuf/extension_set.cc:2060:14: error: switch missing default case [-Werror=switch-default]
2060 | switch (real_type(type)) {
| ^
external/com_google_protobuf/src/google/protobuf/extension_set.cc:2111:12: error: switch missing default case [-Werror=switch-default]
2111 | switch (real_type(type)) {
| ^
cc1plus: all warnings being treated as errors
Target //main:hello-world failed to build
INFO: Elapsed time: 3.122s, Critical Path: 3.00s
INFO: 18 processes: 9 internal, 9 linux-sandbox.
FAILED: Build did NOT complete successfully
Bazel is going to build parts of protobuf twice, once for the host and once for the target. extension_set.cc is one of those. --host_crosstool_top will be used when compiling for the host to build protoc to be run later in the build. Your custom toolchain will be used when building those same files for the target as part of the final binary.
Your build failure is when building for the target with your custom toolchain. You'll need to make that work somehow. I often end up modifying BUILD files to add -Wno-* copts so they work with my toolchains. --per_file_copt could be used instead.
If you want to just build the host version while setting things up, write a simple genrule like this:
genrule(
name = "abc",
tools = [ "#com_google_protobuf//:protoc" ],
outs = [ "dummy" ],
cmd = "touch $#",
)
If you bazel build abc, then bazel will build protoc for the host, even though it's not actually used by the cmd.
I use tineytex package and have no problem knitting a pdf when I click on the knit button in rStudio. However, when I called rmarkdown::render() with the same .Rmd file as input, only an intermeidate .tex file was generated in the target folder.
Below is my code.
rmarkdown::render(input = "C:/Users/sqhuang/Pdf.Rmd",
output_format = "pdf_document",
output_file = "test.pdf",
output_dir = ot_path)
Below is the error messages that I got.
processing file: Pdf.Rmd
|......... | 14%
ordinary text without R code
|................... | 29%
label: setup (with options)
List of 1
$ echo: logi FALSE
|............................ | 43%
ordinary text without R code
|..................................... | 57%
label: cars
|.............................................. | 71%
ordinary text without R code
|........................................................ | 86%
label: pressure (with options)
List of 1
$ echo: logi FALSE
|.................................................................| 100%
ordinary text without R code
output file: Pdf.knit.md
"C:/PROGRA~1/Pandoc/pandoc" +RTS -K512m -RTS Pdf.utf8.md --to latex
--from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash
--output pandoc15f027594a1c.tex --template "C:\PROGRA~1\R\R-36~1.1\library\RMARKD~1\rmd\latex\DEFAUL~3.TEX"
--highlight-style tango --pdf-engine pdflatex --variable graphics=yes --variable "geometry:margin=1in" --variable "compact-title:yes" This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/W32TeX)
(preloaded format=pdflatex) restricted \write18 enabled. warning:
kpathsea: //enterprise2/Users4$/Sqhuang_a/My Documents: Unrecognized
variable construct $/'. warning: kpathsea:
//enterprise2/Users4$/Sqhuang_a/My Documents: Unrecognized variable
construct$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My
Documents: Unrecognized variable construct $/'. warning: kpathsea:
//enterprise2/Users4$/Sqhuang_a/My
Documents/.TinyTeX/texmf-config/web2c/pdftex: Unrecognized variable
construct$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My
Documents/.TinyTeX/texmf-var/web2c/pdftex: Unrecognized variable
construct $/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My
Documents/.TinyTeX/texmf-home/web2c/pdftex: Unrecognized variable
construct$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My
Documents/.TinyTeX/texmf-config/web2c: Unrecognized variable construct
$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My
Documents/.TinyTeX/texmf-var/web2c: Unrecognized variable construct
$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My
Documents/.TinyTeX/texmf-home/web2c: Unrecognized variable construct
`$/'. entering extended mode Error: Failed to compile
\endeavor/apps_doc$/Applications/0_Support/GCS/Brett - Other
Duties/BAR/Steph/AL/Jul/test_report.tex. See
https://yihui.name/tinytex/r/#debugging for debugging tips.
I think I've figured out the problem (unfortunately, I seem to have ran into a further issue, but I think I've resolved this one anyway).
Basically, kpathsea is searching everywhere in your system for the needed packages. This means it's trying to search in directories that it can't read properly (because of the $ symbol amongst others). The solution was to find the texmf.cnf file which looks something like this:
% (Public domain.)
% This texmf.cnf file should contain only your personal changes from the
% original texmf.cnf (for example, as chosen in the installer).
%
% That is, if you need to make changes to texmf.cnf, put your custom
% settings in this file, which is .../texlive/YYYY/texmf.cnf, rather than
% the distributed file (which is .../texlive/YYYY/texmf-dist/web2c/texmf.cnf).
% And include *only* your changed values, not a copy of the whole thing!
%
TEXMFLOCAL = $SELFAUTOPARENT/texmf-local
TEXMFHOME = $HOME/.TinyTeX/texmf-home
TEXMFVAR = $HOME/.TinyTeX/texmf-var
TEXMFCONFIG = $HOME/.TinyTeX/texmf-config
OSFONTDIR = $SystemRoot/fonts//
ASYMPTOTE_HOME = $TEXMFCONFIG/asymptote
% Prefer external Perl for third-party TeXLive Perl scripts
% Was set to 1 if at install time a sufficiently recent Perl was detected.
TEXLIVE_WINDOWS_TRY_EXTERNAL_PERL = 0
TEXMFAUXTREES = C:/PROGRA~1/R/R-36~1.3/share/texmf,
When searching, kpathsea replaces the $HOME with a directory, which contains a $, e.g., for me $HOME gets replaced by my default Documents folder (which is on a shared network drive).
I replaced anywhere that had a $HOME/.TinyTeX with ./TinyTeX, which would make kpathsea search in the directory where I have actually installed the TinyTex (and, more specifically to not search in the default directory.)
Hope this helps anybody having this issue and provides some help for developers on how to maybe stop this problem in the future.
This is not the first time I compiled caffe, but I still have problems that I can't solve. The caffe version I used is https://github.com/chuanqi305/ssd, the compiled version is GPU, I successfully compiled and run on my computer ( Ubuntu 16.04 GTX1080TI*1 cuda9.0) , but in the school server (Ubuntu 14.04 Tesla k80*2+Tesla k40*2 cuda8.0), the same code, the same configuration, but the compilation failed。The error occurred in the code compilation phase rather than the link phase, but the code itself is definitely no problem, because it has been compiled successfully on another computer, I don't know if it is because of my gcc/g++ version.
I tried to compile the parallel.cpp file myself using the g++ command. When I don't specify the header file path, the same error will occur, but in the Makefile, the location of the header file has been added.
The error message is below:
SGM#user-SMBIOS-implementations-newer-thandmidecode-Super-Server:~/ssd-ssd$ sudo make all
PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/parallel.cpp
src/caffe/parallel.cpp:70:1: error: ‘Params’ does not name a type
Params<Dtype>::Params(shared_ptr<Solver<Dtype> > root_solver)
^
src/caffe/parallel.cpp:77:1: error: ‘GPUParams’ does not name a type
GPUParams<Dtype>::GPUParams(shared_ptr<Solver<Dtype> > root_solver, int device)
^
src/caffe/parallel.cpp:102:1: error: ‘GPUParams’ does not name a type
GPUParams<Dtype>::~GPUParams() {
^
src/caffe/parallel.cpp:110:15: error: expected initializer before ‘<’ token
void GPUParams<Dtype>::configure(Solver<Dtype>* solver) const {
^
src/caffe/parallel.cpp:117:6: error: ‘DevicePair’ has not been declared
void DevicePair::compute(const vector<int> devices, vector<DevicePair>* pairs) {
^
src/caffe/parallel.cpp:117:60: error: ‘DevicePair’ was not declared in this scope
void DevicePair::compute(const vector<int> devices, vector<DevicePair>* pairs) {
^
src/caffe/parallel.cpp:117:70: error: template argument 1 is invalid
void DevicePair::compute(const vector<int> devices, vector<DevicePair>* pairs) {
^
src/caffe/parallel.cpp:117:70: error: template argument 2 is invalid
src/caffe/parallel.cpp: In function ‘void caffe::compute(std::vector<int>, int*)’:
src/caffe/parallel.cpp:133:20: error: request for member ‘push_back’ in ‘* pairs’, which is of non-class type ‘int’
pairs->push_back(DevicePair(remaining[i], remaining[j]));
^
src/caffe/parallel.cpp:133:67: error: ‘DevicePair’ was not declared in this scope
pairs->push_back(DevicePair(remaining[i], remaining[j]));
^
src/caffe/parallel.cpp:157:18: error: request for member ‘push_back’ in ‘* pairs’, which is of non-class type ‘int’
pairs->push_back(DevicePair(remaining[i], remaining[j]));
^
src/caffe/parallel.cpp:157:65: error: ‘DevicePair’ was not declared in this scope
pairs->push_back(DevicePair(remaining[i], remaining[j]));
^
src/caffe/parallel.cpp:175:14: error: request for member ‘push_back’ in ‘* pairs’, which is of non-class type ‘int’
pairs->push_back(DevicePair(remaining[i], remaining[i + 1]));
^
src/caffe/parallel.cpp:175:65: error: ‘DevicePair’ was not declared in this scope
pairs->push_back(DevicePair(remaining[i], remaining[i + 1]));
^
src/caffe/parallel.cpp:185:10: error: request for member ‘insert’ in ‘* pairs’, which is of non-class type ‘int’
pairs->insert(pairs->begin(), DevicePair(-1, remaining[0]));
^
src/caffe/parallel.cpp:185:24: error: request for member ‘begin’ in ‘* pairs’, which is of non-class type ‘int’
pairs->insert(pairs->begin(), DevicePair(-1, remaining[0]));
^
src/caffe/parallel.cpp:185:60: error: ‘DevicePair’ was not declared in this scope
pairs->insert(pairs->begin(), DevicePair(-1, remaining[0]));
^
In file included from src/caffe/parallel.cpp:4:0:
src/caffe/parallel.cpp:187:16: error: request for member ‘size’ in ‘* pairs’, which is of non-class type ‘int’
CHECK(pairs->size() == devices.size());
^
src/caffe/parallel.cpp:188:30: error: request for member ‘size’ in ‘* pairs’, which is of non-class type ‘int’
for (int i = 0; i < pairs->size(); ++i) {
^
In file included from src/caffe/parallel.cpp:4:0:
src/caffe/parallel.cpp:189:21: error: invalid types ‘int[int]’ for array subscript
CHECK((*pairs)[i].parent() != (*pairs)[i].device());
^
src/caffe/parallel.cpp:189:45: error: invalid types ‘int[int]’ for array subscript
CHECK((*pairs)[i].parent() != (*pairs)[i].device());
^
src/caffe/parallel.cpp:190:36: error: request for member ‘size’ in ‘* pairs’, which is of non-class type ‘int’
for (int j = i + 1; j < pairs->size(); ++j) {
^
In file included from src/caffe/parallel.cpp:4:0:
src/caffe/parallel.cpp:191:23: error: invalid types ‘int[int]’ for array subscript
CHECK((*pairs)[i].device() != (*pairs)[j].device());
^
src/caffe/parallel.cpp:191:47: error: invalid types ‘int[int]’ for array subscript
CHECK((*pairs)[i].device() != (*pairs)[j].device());
^
src/caffe/parallel.cpp: At global scope:
src/caffe/parallel.cpp:202:1: error: ‘P2PSync’ does not name a type
P2PSync<Dtype>::P2PSync(shared_ptr<Solver<Dtype> > root_solver,
^
src/caffe/parallel.cpp:249:1: error: ‘P2PSync’ does not name a type
P2PSync<Dtype>::~P2PSync() {
^
src/caffe/parallel.cpp:271:13: error: expected initializer before ‘<’ token
void P2PSync<Dtype>::InternalThreadEntry() {
^
src/caffe/parallel.cpp:287:13: error: expected initializer before ‘<’ token
void P2PSync<Dtype>::on_start() {
^
src/caffe/parallel.cpp:325:13: error: expected initializer before ‘<’ token
void P2PSync<Dtype>::on_gradients_ready() {
^
src/caffe/parallel.cpp:383:13: error: expected initializer before ‘<’ token
void P2PSync<Dtype>::Prepare(const vector<int>& gpus,
^
src/caffe/parallel.cpp:421:13: error: expected initializer before ‘<’ token
void P2PSync<Dtype>::Run(const vector<int>& gpus) {
^
In file included from /usr/local/include/caffe/blob.hpp:8:0,
from /usr/local/include/caffe/caffe.hpp:7,
from src/caffe/parallel.cpp:12:
src/caffe/parallel.cpp:439:19: error: ‘Params’ is not a class template
INSTANTIATE_CLASS(Params);
^
src/caffe/parallel.cpp:439:19: error: explicit instantiation of non-template type ‘caffe::Params’
src/caffe/parallel.cpp:439:19: error: ‘Params’ is not a class template
INSTANTIATE_CLASS(Params);
^
src/caffe/parallel.cpp:439:19: error: explicit instantiation of non-template type ‘caffe::Params’
src/caffe/parallel.cpp:440:19: error: ‘GPUParams’ is not a class template
INSTANTIATE_CLASS(GPUParams);
^
src/caffe/parallel.cpp:440:19: error: explicit instantiation of non-template type ‘caffe::GPUParams’
src/caffe/parallel.cpp:440:19: error: ‘GPUParams’ is not a class template
INSTANTIATE_CLASS(GPUParams);
^
src/caffe/parallel.cpp:440:19: error: explicit instantiation of non-template type ‘caffe::GPUParams’
src/caffe/parallel.cpp:441:19: error: ‘P2PSync’ is not a class template
INSTANTIATE_CLASS(P2PSync);
^
src/caffe/parallel.cpp:441:19: error: explicit instantiation of non-template type ‘caffe::P2PSync’
src/caffe/parallel.cpp:441:19: error: ‘P2PSync’ is not a class template
INSTANTIATE_CLASS(P2PSync);
^
src/caffe/parallel.cpp:441:19: error: explicit instantiation of non-template type ‘caffe::P2PSync’
make: *** [.build_release/src/caffe/parallel.o] Error 1
Makefile.config
## Refer to http://caffe.berkeleyvision.org/installation.html
# Contributions simplifying and improving our build system are welcome!
# cuDNN acceleration switch (uncomment to build with cuDNN).
USE_CUDNN := 1
# CPU-only switch (uncomment to build without GPU support).
# CPU_ONLY := 1
# uncomment to disable IO dependencies and corresponding data layers
# USE_OPENCV := 0
# USE_LEVELDB := 0
# USE_LMDB := 0
# uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary)
# You should not set this flag if you will be reading LMDBs with any
# possibility of simultaneous read and write
# ALLOW_LMDB_NOLOCK := 1
# Uncomment if you're using OpenCV 3
OPENCV_VERSION := 3
# To customize your choice of compiler, uncomment and set the following.
# N.B. the default for Linux is g++ and the default for OSX is clang++
# CUSTOM_CXX := g++
# CUDA directory contains bin/ and lib/ directories that we need.
CUDA_DIR := /usr/local/cuda
# On Ubuntu 14.04, if cuda tools are installed via
# "sudo apt-get install nvidia-cuda-toolkit" then use this instead:
# CUDA_DIR := /usr
# CUDA architecture setting: going with all of them.
# For CUDA < 6.0, comment the lines after *_35 for compatibility.
CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
-gencode arch=compute_20,code=sm_21 \
-gencode arch=compute_30,code=sm_30 \
-gencode arch=compute_35,code=sm_35 \
-gencode arch=compute_50,code=sm_50 \
-gencode arch=compute_52,code=sm_52 \
-gencode arch=compute_60,code=sm_60 \
-gencode arch=compute_61,code=sm_61 \
-gencode arch=compute_61,code=compute_61
# BLAS choice:
# atlas for ATLAS (default)
# mkl for MKL
# open for OpenBlas
# BLAS := atlas
BLAS := open
# Custom (MKL/ATLAS/OpenBLAS) include and lib directories.
# Leave commented to accept the defaults for your choice of BLAS
# (which should work)!
# BLAS_INCLUDE := /path/to/your/blas
# BLAS_LIB := /path/to/your/blas
# Homebrew puts openblas in a directory that is not on the standard search path
# BLAS_INCLUDE := $(shell brew --prefix openblas)/include
# BLAS_LIB := $(shell brew --prefix openblas)/lib
# This is required only if you will compile the matlab interface.
# MATLAB directory should contain the mex binary in /bin.
# MATLAB_DIR := /usr/local
# MATLAB_DIR := /Applications/MATLAB_R2012b.app
# NOTE: this is required only if you will compile the python interface.
# We need to be able to find Python.h and numpy/arrayobject.h.
#PYTHON_INCLUDE := /usr/include/python2.7 \
# /usr/lib/python2.7/dist-packages/numpy/core/include
# Anaconda Python distribution is quite popular. Include path:
# Verify anaconda location, sometimes it's in root.
ANACONDA_HOME := /home/SGM/anaconda3
PYTHON_INCLUDE := /home/SGM/anaconda3/include \
/home/SGM/anaconda3/include/python3.6m \
/home/SGM/anaconda3/lib/python3.6/site-packages/numpy/core/include
# Uncomment to use Python 3 (default is Python 2)
PYTHON_LIBRARIES := boost_python3 python3.6m
PYTHON_INCLUDE := /home/SGM/anaconda3/include/python3.6m \
/home/SGM/anaconda3/lib/python3.6/site-packages/numpy/core/include
# We need to be able to find libpythonX.X.so or .dylib.
PYTHON_LIB := /usr/lib
# PYTHON_LIB := $(ANACONDA_HOME)/lib
# Homebrew installs numpy in a non standard path (keg only)
# PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include
# PYTHON_LIB += $(shell brew --prefix numpy)/lib
# Uncomment to support layers written in Python (will link against Python libs)
WITH_PYTHON_LAYER := 1
# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/local/hdf5/include
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/local/hdf5/lib /home/SGM/anaconda3/lib/
# If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies
# INCLUDE_DIRS += $(shell brew --prefix)/include
# LIBRARY_DIRS += $(shell brew --prefix)/lib
# Uncomment to use `pkg-config` to specify OpenCV library paths.
# (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)
# USE_PKG_CONFIG := 1
# N.B. both build and distribute dirs are cleared on `make clean`
BUILD_DIR := build
DISTRIBUTE_DIR := distribute
# Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171
# DEBUG := 1
# The ID of the GPU that 'make runtest' will use to run unit tests.
TEST_GPUID := 0
# enable pretty build (comment to see full commands)
Q ?= #
When you change the environment,have you edit the path in Makefile.config?
Please make the python path correct and make sure cudnn is installed,if you want to compile with cuDNN.
Not very clear with your issue, try comment USE_CUDNN := 1
I need to render a template from a plugin to a .gsp page. I wrote : <g:render plugin="melanin 2.0.0" template="/m-melanin-fingerprint/m-melanin-fingerprint-sidebar"/>
But then I get this error :
Error 500: Error processing GroovyPageView: Template not found for
name [/m-melanin-fingerprint/m-melanin-fingerprint-sidebar] and path
[/m-melanin-fingerprint/_m-melanin-fingerprint-sidebar.gsp] Servlet:
grails URI: /RBCS/grails/VIBAction/index.dispatch Exception Message:
Template not found for name
[/m-melanin-fingerprint/m-melanin-fingerprint-sidebar] and path
[/m-melanin-fingerprint/_m-melanin-fingerprint-sidebar.gsp] Caused by:
Error processing GroovyPageView: Template not found for name
[/m-melanin-fingerprint/m-melanin-fingerprint-sidebar] and path
[/m-melanin-fingerprint/_m-melanin-fingerprint-sidebar.gsp] Class:
actionPlan.gsp At Line: [40] Code Snippet: 39: 40: 41:
This is my project:
Please help me fix it. Sorry my English is not good. Thank you.
try removing the version from your plugin-ref:
<g:render plugin="melanin" template="/m-melanin-fingerprint/m-melanin-fingerprint-sidebar"/>