Project

General

Profile

Actions

Bug #2877

closed

rust: windows build fails in gen-c-headers.py

Added by Victor Julien about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

Making all in rust
make[2]: Entering directory '/c/Gitlab-Runner/builds/hNRUpEPe/0/inliniac/suricata-ci/suricata/rust'
cd ../rust && /mingw64/bin/python3 ./gen-c-headers.py
Traceback (most recent call last):
  File "./gen-c-headers.py", line 232, in <module>
    sys.exit(main())
  File "./gen-c-headers.py", line 229, in main
    gen_headers(path)
  File "./gen-c-headers.py", line 167, in gen_headers
    output_filename = make_output_filename(filename)
  File "./gen-c-headers.py", line 143, in make_output_filename
    last = os.path.splitext(parts.pop())[0]
IndexError: pop from empty list
make[2]: *** [Makefile:533: all-local] Error 1
make[2]: Leaving directory '/c/Gitlab-Runner/builds/hNRUpEPe/0/inliniac/suricata-ci/suricata/rust'
make[1]: *** [Makefile:499: all-recursive] Error 1
make[1]: Leaving directory '/c/Gitlab-Runner/builds/hNRUpEPe/0/inliniac/suricata-ci/suricata'
make: *** [Makefile:425: all] Error 2
ERROR: Job failed: exit status 2
Actions #1

Updated by Victor Julien about 5 years ago

When I print filename, I get:

cd ../rust && /mingw64/bin/python3 ./gen-c-headers.py
./src\applayer.rs

The os.path.sep is \

Actions #2

Updated by Victor Julien about 5 years ago

Wonder if os.path.basename can be used instead: https://docs.python.org/3.7/library/os.path.html

Actions #3

Updated by Victor Julien about 5 years ago

  • Status changed from New to Assigned
  • Assignee changed from OISF Dev to Victor Julien
Actions #4

Updated by Victor Julien about 5 years ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF