Linux Build Error

28 views
Skip to first unread message

Nathan Wamsley

unread,
Nov 6, 2020, 3:59:50 PM11/6/20
to spctools-discuss

I have extracted version 5.2.0 on my computer and am running Ubuntu 20.04.1. I have also followed the instructions on the BUILD_LINUX file that comes with the distribution. I believe I have installed the dependencies. When I navigate into the "release_5-2-0" directory and run "make all," I see the following:

(base) nathan@NathanLaptop:~/release_5-2-0$ make all
cd /home/nathan/release_5-2-0/build/gnu-x86_64/artifacts/comet_source_2018014; make
make[1]: Entering directory '/home/nathan/release_5-2-0/build/gnu-x86_64/artifacts/comet_source_2018014'
g++ -O3 -Wall -Wextra -static -Wno-char-subscripts -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D__LINUX__ -IMSToolkit/include -IComet
Search Comet.cpp -c
In file included from CometSearch/Common.h:40,
                from Comet.cpp:18:
MSToolkit/include/MSReader.h:96:80: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
  96 |   void writeFile(const char* c, MSFileFormat ff, MSObject& m, char* sha1Report='\0');
     |                                                                                ^~~~
     |                                                                                |
     |                                                                                char
Comet.cpp: In function ‘void LoadParameters(char*, CometInterfaces::ICometSearchManager*)’:
Comet.cpp:235:24: warning: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Wrestrict]
 235 |                sprintf(szVersion, "%s %s %s", szVersion, szRev1, szRev2);
     |                        ^~~~~~~~~              ~~~~~~~~~
Comet.cpp:1037:9: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wu
nused-result]
1037 |    fgets(szParamBuf, SIZE_BUF, fp);
     |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
Comet.cpp:1077:12: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-W
unused-result]
1077 |       fgets(szParamBuf, SIZE_BUF, fp);
     |       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:20: Comet.o] Error 1
make[1]: Leaving directory '/home/nathan/release_5-2-0/build/gnu-x86_64/artifacts/comet_source_2018014'
make: *** [extern/Makefile:353: /home/nathan/release_5-2-0/build/gnu-x86_64/artifacts/comet_source_2018014/comet] Error 2
(base) nathan@NathanLaptop:~/release_5-2-0$ sudo make all
cd /home/nathan/release_5-2-0/build/gnu-x86_64/artifacts/comet_source_2018014; make
make[1]: Entering directory '/home/nathan/release_5-2-0/build/gnu-x86_64/artifacts/comet_source_2018014'
g++ -O3 -Wall -Wextra -static -Wno-char-subscripts -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D__LINUX__ -IMSToolkit/include -IComet
Search Comet.cpp -c
In file included from CometSearch/Common.h:40,
                from Comet.cpp:18:
MSToolkit/include/MSReader.h:96:80: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
  96 |   void writeFile(const char* c, MSFileFormat ff, MSObject& m, char* sha1Report='\0');
     |                                                                                ^~~~
     |                                                                                |
     |                                                                                char
Comet.cpp: In function ‘void LoadParameters(char*, CometInterfaces::ICometSearchManager*)’:
Comet.cpp:235:24: warning: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Wrestrict]
 235 |                sprintf(szVersion, "%s %s %s", szVersion, szRev1, szRev2);
     |                        ^~~~~~~~~              ~~~~~~~~~
Comet.cpp:1037:9: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wu
nused-result]
1037 |    fgets(szParamBuf, SIZE_BUF, fp);
     |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
Comet.cpp:1077:12: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-W
unused-result]
1077 |       fgets(szParamBuf, SIZE_BUF, fp);
     |       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:20: Comet.o] Error 1
make[1]: Leaving directory '/home/nathan/release_5-2-0/build/gnu-x86_64/artifacts/comet_source_2018014'
make: *** [extern/Makefile:353: /home/nathan/release_5-2-0/build/gnu-x86_64/artifacts/comet_source_2018014/comet] Error 2

Does anyone know what could be happening here?

David Shteynberg

unread,
Nov 6, 2020, 4:29:33 PM11/6/20
to spctools-discuss
Hi Nathan,

These are some bugs in the TPP externals that have been fixed in the more recent versions of the code.   You can either pull the offending files from a more recent version of the code, use an up-to-date trunk version of the code (and report any bugs you find ;), or wait until we make an official release.

Cheers,
-David

--
You received this message because you are subscribed to the Google Groups "spctools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spctools-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spctools-discuss/6f1b57ab-0813-4b60-998d-dc19b221bb1en%40googlegroups.com.

Luis Mendoza

unread,
Nov 6, 2020, 6:37:26 PM11/6/20
to spctools...@googlegroups.com
Hi Nathan,

In case you want to build something that closely resembles 5.2.0, you can follow the steps on this page:

making sure to use revision 7909.   Alternatively, you can use an older compiler to build 5.2.0 :
"The release version of TPP 5.2.0 was discovered to have a minor bug that prevented a clean compile under the version of GCC in Ubuntu 18.04, so in this example below we actually pull from revision 7909, which is just after the 5.2.0 release. Under older versions of GCC, the stock 5.2.0 will compile fine."

HTH,
--Luis



Reply all
Reply to author
Forward
0 new messages