You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/04/05 23:22:02 UTC
[GitHub] [incubator-mxnet] hcho3 commented on issue #14510: [TEST] upgrade
dmlc-core
hcho3 commented on issue #14510: [TEST] upgrade dmlc-core
URL: https://github.com/apache/incubator-mxnet/pull/14510#issuecomment-480450651
@eric-haibin-lin This patch should fix amalgamation:
```patch
diff --git a/amalgamation/amalgamation.py b/amalgamation/amalgamation.py
index 0a4be02b8..edf01941d 100644
--- a/amalgamation/amalgamation.py
+++ b/amalgamation/amalgamation.py
@@ -46,7 +46,13 @@ if platform.system() != 'Darwin':
if platform.system() != 'Windows':
blacklist.append('windows.h')
blacklist.append('process.h')
+ blacklist.append('Shlwapi.h')
+if platform.system() == 'Windows':
+ blacklist.append('unistd.h')
+
+if 'freebsd' not in sys.platform:
+ blacklist.append('sys/endian.h')
def get_sources(def_file):
sources = []
@@ -94,6 +100,7 @@ def find_source(name, start, stage):
re1 = re.compile('<([./a-zA-Z0-9_-]*)>')
re2 = re.compile('"([./a-zA-Z0-9_-]*)"')
+re3 = re.compile('DMLC_EXECINFO_H')
sysheaders = []
history = set([])
@@ -129,6 +136,9 @@ def expand(x, pending, stage):
with open(x, 'rb') as x_h:
for line in x_h.readlines():
uline = line.decode('utf-8')
+ if '#define DMLC_LOG_STACK_TRACE 1' in uline.strip():
+ # Do not enable stacktrace logging
+ continue
if uline.find('#include') < 0:
out.write(line)
continue
@@ -138,10 +148,15 @@ def expand(x, pending, stage):
m = re1.search(uline)
if not m:
m = re2.search(uline)
- if not m:
- print(uline + ' not found')
- continue
- path = m.groups()[0]
+ if m:
+ path = m.groups()[0]
+ else:
+ m = re3.search(uline)
+ if m:
+ path = 'execinfo.h'
+ else:
+ print(uline + ' not found')
+ continue
h = path.strip('./') if "../3rdparty/" not in path else path
if h.endswith('complex.h') and x.endswith('openblas_config.h'):
source = ''
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services