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

Compiling Errors #1

Open
vkumma002c opened this issue Jan 5, 2017 · 10 comments
Open

Compiling Errors #1

vkumma002c opened this issue Jan 5, 2017 · 10 comments

Comments

@vkumma002c
Copy link

vkumma002c commented Jan 5, 2017

Dear Philip,

I am trying to create a "influx-mysql" daemon using the this github repo. I have installed all dependencies such as qt5, snappy, Nim and nimble on centos 7 server.

When i tried to compile using the below instructions, i am getting the compile error as below.

Instructions followed:

nimble cpp --out:bin/influx_mysql influx_mysql/src/influx_mysql # 4

Compile time error:

[root@grafana nimble]# src/nimble cpp --out:bin/influx_mysql /usr/local/influx-mysql/influx_mysql/src/influx_mysql.nim # 4
Verifying dependencies for nimble@0.8.0
Info: Dependency on compiler@#head already satisfied
Verifying dependencies for compiler@#head
Compiling /usr/local/influx-mysql/influx_mysql/src/influx_mysql.nim (from package nimble) using cpp backend
Output: Hint: used config file '/usr/local/Nim/config/nim.cfg' [Conf]
... Hint: used config file '/usr/local/influx-mysql/influx_mysql/src/nim.cfg' [Conf]
... Hint: system [Processing]
... Hint: influx_mysql [Processing]
... Hint: future [Processing]
... Hint: macros [Processing]
... Hint: strtabs [Processing]
... Hint: hashes [Processing]
... Hint: strutils [Processing]
... Hint: parseutils [Processing]
... Hint: math [Processing]
... Hint: algorithm [Processing]
... Hint: etcpriv [Processing]
... Hint: os [Processing]
... Hint: times [Processing]
... Hint: posix [Processing]
... Hint: asyncdispatch [Processing]
... Hint: oids [Processing]
... Hint: endians [Processing]
... Hint: tables [Processing]
... Hint: heapqueue [Processing]
... Hint: nativesockets [Processing]
... Hint: net [Processing]
... Hint: sets [Processing]
... Hint: deques [Processing]
... Hint: selectors [Processing]
... Hint: epoll [Processing]
... Hint: asyncnet [Processing]
... Hint: httpcore [Processing]
... Hint: asynchttpserver [Processing]
... Hint: uri [Processing]
... Hint: lists [Processing]
... Hint: json [Processing]
... Hint: lexbase [Processing]
... Hint: streams [Processing]
... Hint: unicode [Processing]
... Hint: base64 [Processing]
... Hint: cgi [Processing]
... Hint: cookies [Processing]
... influx_mysql.nim(32, 8) Error: cannot open 'qt5_qtsql'
Tip: 2 messages have been suppressed, use --verbose to show them.
Error: Traceback (most recent call last)
... nimble.nim(1068) nimble
... nimble.nim(1016) doAction
... nimble.nim(659) execBackend
... tools.nim(33) doCmd
... Execution failed with exit code 1
... Command: "/usr/local/Nim/bin/nim" cpp --noNimblePath --path:"/root/.nimble/pkgs/compiler-#head" --out:bin/influx_mysql "/usr/local/influx-mysql/influx_mysql/src/influx_mysql.nim"
... Output: Hint: used config file '/usr/local/Nim/config/nim.cfg' [Conf]
... Hint: used config file '/usr/local/influx-mysql/influx_mysql/src/nim.cfg' [Conf]
... Hint: system [Processing]
... Hint: influx_mysql [Processing]
... Hint: future [Processing]
... Hint: macros [Processing]
... Hint: strtabs [Processing]
... Hint: hashes [Processing]
... Hint: strutils [Processing]
... Hint: parseutils [Processing]
... Hint: math [Processing]
... Hint: algorithm [Processing]
... Hint: etcpriv [Processing]
... Hint: os [Processing]
... Hint: times [Processing]
... Hint: posix [Processing]
... Hint: asyncdispatch [Processing]
... Hint: oids [Processing]
... Hint: endians [Processing]
... Hint: tables [Processing]
... Hint: heapqueue [Processing]
... Hint: nativesockets [Processing]
... Hint: net [Processing]
... Hint: sets [Processing]
... Hint: deques [Processing]
... Hint: selectors [Processing]
... Hint: epoll [Processing]
... Hint: asyncnet [Processing]
... Hint: httpcore [Processing]
... Hint: asynchttpserver [Processing]
... Hint: uri [Processing]
... Hint: lists [Processing]
... Hint: json [Processing]
... Hint: lexbase [Processing]
... Hint: streams [Processing]
... Hint: unicode [Processing]
... Hint: base64 [Processing]
... Hint: cgi [Processing]
... Hint: cookies [Processing]
... influx_mysql.nim(32, 8) Error: cannot open 'qt5_qtsql'

Can you kindly help me to fix this error and proceed further.

Thanks
Venki

@philip-wernersbach
Copy link
Owner

Looks like you're running the compilation steps from outside of your cloned Git repository. The compilation steps must be run from the root of your influx-mysql Git working directory.

So in this instance, try cd'ing to /usr/local/influx-mysql and rerunning steps 1-5. Let me know if that works.

@vkumma002c
Copy link
Author

Thanks Philip for your reply.

As suggested, I ran the steps1-2 from /usr/local/influx-mysql but the step2 has failed with below error though nimble was already installed.

[root@grafana influx-mysql]# nimble install -d # 2
bash: nimble: command not found

Nimble installation directory:

[root@grafana local]# cd nimble/
[root@grafana nimble]# ls -ltr
total 2684
-rw-r--r--. 1 root root 813 Jan 5 16:55 nimble.nimble
-rw-r--r--. 1 root root 1353 Jan 5 16:55 nimble.bash-completion
-rw-r--r--. 1 root root 1442 Jan 5 16:55 license.txt
-rw-r--r--. 1 root root 10260 Jan 5 16:55 changelog.markdown
-rw-r--r--. 1 root root 30833 Jan 5 16:55 readme.markdown
-rw-r--r--. 1 root root 162 Jan 5 16:55 todo.markdown
drwxr-xr-x. 12 root root 4096 Jan 5 16:55 tests
drwxr-xr-x. 4 root root 88 Jan 5 16:56 src
-rwxr-xr-x. 1 root root 2679776 Jan 5 16:56 nimble
drwxr-xr-x. 2 root root 6 Jan 5 17:04 bin
[root@grafana nimble]# pwd
/usr/local/nimble

Can you please suggest on this.

@philip-wernersbach
Copy link
Owner

What is in ~/.nimble/bin?

@vkumma002c
Copy link
Author

Hi Philip, There is nothing in ~/.nimble/bin for now.

@philip-wernersbach
Copy link
Owner

It looks like you compiled nimble but forgot to install it. cd to /usr/local/nimble and run src/nimble install, then add ~/.nimble/bin to your PATH. As far as I'm aware, the nimble binary is supposed to be located at ~/.nimble/bin/nimble.

@vkumma002c vkumma002c reopened this Jan 9, 2017
@vkumma002c
Copy link
Author

vkumma002c commented Jan 9, 2017

Thanks Philip for your continuous support. I have re-installed the nimble and can see the binary file now. I ran the steps1-5 again but got the below error at step4.

Error:

[root@grafana influx-mysql]# nimble cpp --out:bin/influx_mysql influx_mysql/src/influx_mysql # 4
Warning: File inside package 'influx_mysql' is outside of permitted namespace, should be named 'influx_mysql.nim' but was named 'influx_line_protocol_to_sql.nim' instead. This will be an error in the future.
Hint: Rename this file to 'influx_mysql.nim', move it into a 'influx_mysql/' subdirectory, or prevent its installation by adding skipFiles = @["influx_line_protocol_to_sql.nim"] to the .nimble file. See https://github.com/nim-lang/nimble#libraries for more info.
Error: Specified file does not exist.
[root@grafana influx-mysql]# nimble cpp --out:bin/influx_mysql influx_mysql/src/influx_mysql # 4
Warning: File inside package 'influx_mysql' is outside of permitted namespace, should be named 'influx_mysql.nim' but was named 'influx_line_protocol_to_sql.nim' instead. This will be an error in the future.
Hint: Rename this file to 'influx_mysql.nim', move it into a 'influx_mysql/' subdirectory, or prevent its installation by adding skipFiles = @["influx_line_protocol_to_sql.nim"] to the .nimble file. See https://github.com/nim-lang/nimble#libraries for more info.
Error: Specified file does not exist.

Can you kindly suggest on this.

@philip-wernersbach
Copy link
Owner

Looks like Nimble 0.8.* changed the "cpp" command slightly. Try specifying "influx_mysql.nim" instead of "influx_mysql/src/influx_mysql".

@sachinrase
Copy link

sachinrase commented Mar 10, 2017

it starts compiling but never finished in my case , looks like it waiting on something

± |master ✓| →  nimble cpp --out:bin/influx_mysql influx_mysql/src/influx_mysql.nim # 4
   Warning: File inside package 'influx_mysql' is outside of permitted namespace, should be named 'influx_mysql.nim' but was named 'influx_line_protocol_to_sql.nim' instead. This will be an error in the future.
      Hint: Rename this file to 'influx_mysql.nim', move it into a 'influx_mysql/' subdirectory, or prevent its installation by adding `skipFiles = @["influx_line_protocol_to_sql.nim"]` to the .nimble file. See https://github.com/nim-lang/nimble#libraries for more info.
   Warning: The .nimble file for this project could make use of additional features, if converted into the new NimScript format.
        ... For more details see:https://github.com/nim-lang/nimble#creating-packages
  Verifying dependencies for influx_mysql@1.0.0
      Info: Dependency on qt5_qtsql@>= 1.0.1 already satisfied
  Verifying dependencies for qt5_qtsql@1.0.1
      Info: Dependency on microasynchttpserver@>= 0.10.0 already satisfied
  Verifying dependencies for microasynchttpserver@0.10.0
      Info: Dependency on picohttpparser@>= 0.10.0 already satisfied
   Warning: File inside package 'picohttpparser' is outside of permitted namespace, should be named 'picohttpparser.nim' but was named 'picohttpparser_api.nim' instead. This will be an error in the future.
      Hint: Rename this file to 'picohttpparser.nim', move it into a 'picohttpparser/' subdirectory, or prevent its installation by adding `skipFiles = @["picohttpparser_api.nim"]` to the .nimble file. See https://github.com/nim-lang/nimble#libraries for more info.
  Verifying dependencies for picohttpparser@0.10.0
  Compiling influx_mysql/src/influx_mysql.nim (from package influx_mysql) using cpp backend
load: 1.88  cmd: nimble 6365 running 278.79u 108.85s
load: 1.88  cmd: nimble 6365 running 279.67u 109.20s
load: 1.88  cmd: nimble 6365 running 280.01u 109.33s
load: 1.81  cmd: nimble 6365 running 280.21u 109.41s
load: 1.81  cmd: nimble 6365 running 280.44u 109.50s
load: 1.81  cmd: nimble 6365 running 280.70u 109.60s
   	




^CTraceback (most recent call last)
nimble.nim(1079)         nimble
nimble.nim(1026)         doAction
nimble.nim(669)          execBackend
tools.nim(24)            doCmd
osproc.nim(1256)         execCmdEx
streams.nim(266)         readLine
streams.nim(180)         readChar
streams.nim(102)         readData
streams.nim(386)         fsReadData
SIGINT: Interrupted by Ctrl-C.

@arbrubusa
Copy link

arbrubusa commented Apr 20, 2017

I'm having the same behavior. When running strace, It seems a problem after influx_line_protocol_to_sql.nim:

> fcntl(5, F_GETFL)                       = 0 (flags O_RDONLY)
> fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdb13e0c000
> read(5, "Hint: used config file '/root/ni"..., 4096) = 166
> read(5, "Hint: influx_mysql [Processing]\n"..., 4096) = 84
> read(5, "Hint: strtabs [Processing]\nHint:"..., 4096) = 111
> read(5, "Hint: math [Processing]\nHint: al"..., 4096) = 53
> read(5, "Hint: etcpriv [Processing]\nHint:"..., 4096) = 74
> read(5, "Hint: posix [Processing]\n", 4096) = 25
> read(5, "Hint: asyncdispatch [Processing]"..., 4096) = 84
> read(5, "Hint: tables [Processing]\nHint: "..., 4096) = 88
> read(5, "Hint: net [Processing]\nHint: set"..., 4096) = 47
> read(5, "Hint: deques [Processing]\n", 4096) = 26
> read(5, "Hint: selectors [Processing]\nHin"..., 4096) = 54
> read(5, "Hint: asyncnet [Processing]\n", 4096) = 28
> read(5, "Hint: httpcore [Processing]\n", 4096) = 28
> read(5, "Hint: asynchttpserver [Processin"..., 4096) = 58
> read(5, "Hint: lists [Processing]\n", 4096) = 25
> read(5, "Hint: json [Processing]\nHint: le"..., 4096) = 78
> read(5, "Hint: unicode [Processing]\n", 4096) = 27
> read(5, "Hint: base64 [Processing]\n", 4096) = 26
> read(5, "Hint: cgi [Processing]\nHint: coo"..., 4096) = 50
> read(5, "Hint: qt5_qtsql [Processing]\nHin"..., 4096) = 238
> read(5, "Hint: qsqlerror [Processing]\nHin"..., 4096) = 336
> read(5, "Hint: reflists [Processing]\nHint"..., 4096) = 142
> read(5, "Hint: influxql_to_sql [Processin"..., 4096) = 118
> read(5, "influx_line_protocol_to_sql.nim("..., 4096) = 498
> read(5, "", 4096)                       = 0
> --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=1212, si_status=SIGSEGV, si_utime=69, si_stime=6} ---
> wait4(1212, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV}], WNOHANG, NULL) = 1212
> read(5, "", 4096)                       = 0

Then is just keep repeating the last line <wait4...>

Any ideas???

@arbrubusa
Copy link

arbrubusa commented Apr 22, 2017

Using:
CentOS 7:

Linux version 3.10.0-514.16.1.el7.x86_64 (builder@kbuilder.dev.centos.org)
(gcc version 4.8.5 20150623 (Red Hat 4.8.5-11)
t5-qtbase-devel-5.6.1-10.el7.x86_64.rpm
nim-0.16.0
microasynchttpserver-0.10.0
picohttpparser-0.10.0
qt5_qtsql-1.0.1

Error on CLI:

[root@centos-srv1 influx-mysql]# strace -o trace nimble cpp --out:bin/influx_mysql influx_mysql/src/influx_mysql.nim
   Warning: File inside package 'influx_mysql' is outside of permitted namespace, should be named 'influx_mysql.nim' but was named 'influx_line_protocol_to_sql.nim' instead. This will be an error in the future.
      Hint: Rename this file to 'influx_mysql.nim', move it into a 'influx_mysql/' subdirectory, or prevent its installation by adding `skipFiles = @["influx_line_protocol_to_sql.nim"]` to the .nimble file. See https://github.com/nim-lang/nimble#libraries for more info.
   Warning: The .nimble file for this project could make use of additional features, if converted into the new NimScript format.
        ... For more details see:https://github.com/nim-lang/nimble#creating-packages
  Verifying dependencies for influx_mysql@1.0.0
      Info: Dependency on qt5_qtsql@>= 1.0.1 already satisfied
  Verifying dependencies for qt5_qtsql@1.0.1
      Info: Dependency on microasynchttpserver@>= 0.10.0 already satisfied
  Verifying dependencies for microasynchttpserver@0.10.0
      Info: Dependency on picohttpparser@>= 0.10.0 already satisfied
   Warning: File inside package 'picohttpparser' is outside of permitted namespace, should be named 'picohttpparser.nim' but was named 'picohttpparser_api.nim' instead. This will be an error in the future.
      Hint: Rename this file to 'picohttpparser.nim', move it into a 'picohttpparser/' subdirectory, or prevent its installation by adding `skipFiles = @["picohttpparser_api.nim"]` to the .nimble file. See https://github.com/nim-lang/nimble#libraries for more info.
  Verifying dependencies for picohttpparser@0.10.0
  Compiling influx_mysql/src/influx_mysql.nim (from package influx_mysql) using cpp backend

Below the full trace until the "No child process".
trace_nimble.txt

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

4 participants