Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile problem: CPATH --- make: *** [wtdbg] Error 1 #4

Closed
YiweiNiu opened this issue Mar 5, 2018 · 12 comments
Closed

Compile problem: CPATH --- make: *** [wtdbg] Error 1 #4

YiweiNiu opened this issue Mar 5, 2018 · 12 comments

Comments

@YiweiNiu
Copy link

YiweiNiu commented Mar 5, 2018

Hello,

I got the following error message when I typed "make":

wtdbg_make_error.txt

Linux version: 2.6.32-504.el6.x86_64
GCC version: 4.9.3
OS: CentOS release 6.6 (Final)

I don't know about C or C++ and don't know what these messages say. Do you know how to fix this? Thanks!

@ruanjue
Copy link
Owner

ruanjue commented Mar 5, 2018

There should be the problem of serach path of GCC. I have a string.h in sourcecode, your GCC used it even I wrote "#include <string.h>", which usually search the glib's string.h first.

Please run gcc -v, and copy the message into this issue.

@YiweiNiu
Copy link
Author

YiweiNiu commented Mar 5, 2018

Thank you for your quick reply!

Here are the messages when running "gcc -v":

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/software/gcc-4.9.3/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/home/software/gcc-4.9.3 --with-mpc=/home/software/
Thread model: posix
gcc version 4.9.3 (GCC)

@ruanjue
Copy link
Owner

ruanjue commented Mar 5, 2018

Ok, please also give me the message of cpp -v.

@YiweiNiu
Copy link
Author

YiweiNiu commented Mar 5, 2018

Run cpp -v:

Using built-in specs.
COLLECT_GCC=cpp
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/home/software/gcc-4.9.3 --with-mpc=/home/software/
Thread model: posix
gcc version 4.9.3 (GCC) 
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=generic' '-march=x86-64'
 /home/software/gcc-4.9.3/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/cc1 -E -quiet -v - -mtune=generic -march=x86-64
ignoring nonexistent directory "/home/software/gcc-4.9.3/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /public/software/compiler/intel/composer_xe_2013_sp1.0.080/mkl/include
 .
 /home/software/gcc-4.9.3/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include
 /usr/local/include
 /home/software/gcc-4.9.3/include
 /home/software/gcc-4.9.3/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include-fixed
 /usr/include
End of search list.

@ruanjue
Copy link
Owner

ruanjue commented Mar 5, 2018

The path . preceded /home/software/gcc-4.9.3/include, it was the problem.

Please type echo $CPATH. If contains ., remove it.

Otherwise, modify Makefile as
Line 4: CC="gcc -I/home/software/gcc-4.9.3/include"
Then make

@YiweiNiu
Copy link
Author

YiweiNiu commented Mar 5, 2018

Thanks for the help!

Here are the messages I got:

$ echo $CPATH
/public/software/compiler/intel/composer_xe_2013_sp1.0.080/mkl/include:

CPATH doesn't contain '.'. Then I modify the Makefile, but still not work:

$ make
"gcc -I/home/software/gcc-4.9.3/include" -g3 -W -Wall -O4 -DTIMESTAMP=1520252552 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -mpopcnt -mssse3 -o wtdbg file_reader.c wtdbg.c -lm -lpthread
/bin/sh: gcc -I/home/software/gcc-4.9.3/include: No such file or directory
make: *** [wtdbg] Error 127

@ruanjue
Copy link
Owner

ruanjue commented Mar 5, 2018

CC=gcc -I/home/software/gcc-4.9.3/include, remove the quote.

@YiweiNiu
Copy link
Author

YiweiNiu commented Mar 5, 2018

After removing the quote, I got the same error as the one I attched at the beginning.

@ruanjue
Copy link
Owner

ruanjue commented Mar 5, 2018

CC=gcc -v -I/home/software/gcc-4.9.3/include. Please give me the first 60 lines of gcc message.

@YiweiNiu
Copy link
Author

YiweiNiu commented Mar 6, 2018

Messages after using CC=gcc -v -I/home/software/gcc-4.9.3/include:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/software/gcc-4.9.3/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/home/software/gcc-4.9.3 --with-mpc=/home/software/
Thread model: posix
gcc version 4.9.3 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-I' '/home/software/gcc-4.9.3/include' '-g3' '-Wextra' '-Wall' '-O4' '-D' 'TIMESTAMP=1520296709' '-D' '_FILE_OFFSET_BITS=64' '-D' '_GNU_SOURCE' '-mpopcnt' '-mssse3' '-o' 'wtdbg' '-mtune=generic' '-march=x86-64'
 /home/software/gcc-4.9.3/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/cc1 -quiet -v -I /home/software/gcc-4.9.3/include -dD -D TIMESTAMP=1520296709 -D _FILE_OFFSET_BITS=64 -D _GNU_SOURCE file_reader.c -quiet -dumpbase file_reader.c -mpopcnt -mssse3 -mtune=generic -march=x86-64 -auxbase file_reader -g3 -O4 -Wextra -Wall -version -o /tmp/ccs9kVa3.s
GNU C (GCC) version 4.9.3 (x86_64-unknown-linux-gnu)
	compiled by GNU C version 4.9.3, GMP version 5.0.2, MPFR version 3.1.4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/home/software/gcc-4.9.3/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/../../../../x86_64-unknown-linux-gnu/include"
ignoring duplicate directory "/home/software/gcc-4.9.3/include"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
 /public/software/compiler/intel/composer_xe_2013_sp1.0.080/mkl/include
 .
 /home/software/gcc-4.9.3/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include
 /usr/local/include
 /home/software/gcc-4.9.3/include
 /home/software/gcc-4.9.3/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include-fixed
 /usr/include
End of search list.
GNU C (GCC) version 4.9.3 (x86_64-unknown-linux-gnu)
	compiled by GNU C version 4.9.3, GMP version 5.0.2, MPFR version 3.1.4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 20795a83d25b409b202bf0afa3a704bc
In file included from ./list.h:28:0,
                 from ./string.h:27,
                 from file_reader.h:24,
                 from file_reader.c:20:
./mem_share.h: In function ‘encap_list’:
./mem_share.h:159:2: warning: implicit declaration of function ‘memset’ [-Wimplicit-function-declaration]
  if(mem_zeros) memset(ptr + cur_cap, 0, e_size * (cap - cur_cap));
  ^
./mem_share.h:159:16: warning: incompatible implicit declaration of built-in function ‘memset’
  if(mem_zeros) memset(ptr + cur_cap, 0, e_size * (cap - cur_cap));
                ^
./mem_share.h: In function ‘open_file_for_read’:
./mem_share.h:226:3: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
   full_name = (char*)alloca(strlen(name) + strlen(suffix) + 1);
   ^
In file included from /usr/include/stdlib.h:497:0,
                 from file_reader.h:23,
                 from file_reader.c:20:
./mem_share.h:226:29: warning: incompatible implicit declaration of built-in function ‘strlen’
   full_name = (char*)alloca(strlen(name) + strlen(suffix) + 1);
                             ^
In file included from ./list.h:28:0,
                 from ./string.h:27,
                 from file_reader.h:24,
                 from file_reader.c:20:
./mem_share.h:227:3: warning: implicit declaration of function ‘memcpy’ [-Wimplicit-function-declaration]
   memcpy(full_name, name, strlen(name));
   ^
./mem_share.h:227:3: warning: incompatible implicit declaration of built-in function ‘memcpy’
./mem_share.h:230:2: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration]
  if(strcmp(full_name, "-") == 0){
  ^
In file included from /usr/include/stdlib.h:497:0,
                 from file_reader.h:23,
                 from file_reader.c:20:
./mem_share.h: In function ‘open_file_for_write’:
./mem_share.h:251:29: warning: incompatible implicit declaration of built-in function ‘strlen’
   full_name = (char*)alloca(strlen(name) + strlen(suffix) + 1);
                             ^
In file included from ./list.h:28:0,
                 from ./string.h:27,
                 from file_reader.h:24,
                 from file_reader.c:20:
./mem_share.h:252:3: warning: incompatible implicit declaration of built-in function ‘memcpy’
   memcpy(full_name, name, strlen(name));
   ^
In file included from /usr/include/stdlib.h:497:0,
                 from file_reader.h:23,
                 from file_reader.c:20:
./mem_share.h: In function ‘open_file_for_append’:
./mem_share.h:278:29: warning: incompatible implicit declaration of built-in function ‘strlen’
   full_name = (char*)alloca(strlen(name) + strlen(suffix) + 1);
                             ^
In file included from ./list.h:28:0,
                 from ./string.h:27,
                 from file_reader.h:24,
                 from file_reader.c:20:
./mem_share.h:279:3: warning: incompatible implicit declaration of built-in function ‘memcpy’
   memcpy(full_name, name, strlen(name));
   ^
./mem_share.h: In function ‘get_linux_sys_info’:
./mem_share.h:316:3: warning: implicit declaration of function ‘strstr’ [-Wimplicit-function-declaration]
   if (strstr(buffer, "MemTotal") == buffer) {
   ^
./mem_share.h:316:7: warning: incompatible implicit declaration of built-in function ‘strstr’
   if (strstr(buffer, "MemTotal") == buffer) {
       ^
./mem_share.h:331:7: warning: incompatible implicit declaration of built-in function ‘strstr’
   if (strstr(buffer, "processor") == buffer) {
       ^
./mem_share.h: In function ‘_char_array_obj_desc_cnt’:
...

Sorry for the late reply.

@ruanjue
Copy link
Owner

ruanjue commented Mar 6, 2018

Haha, I see. Your CPATH!
Remove tailing :
export CPATH="/public/software/compiler/intel/composer_xe_2013_sp1.0.080/mkl/include".
make

@ruanjue ruanjue closed this as completed Mar 6, 2018
@YiweiNiu
Copy link
Author

YiweiNiu commented Mar 6, 2018

It works! Thanks for your patience and kindness~

@ruanjue ruanjue changed the title make: *** [wtdbg] Error 1 Compile problem: CPATH --- make: *** [wtdbg] Error 1 Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants