Skip to content

Commit f07d987

Browse files
authored
Merge pull request #76 from yuch7/1335
1335 update for compression and off_t type
2 parents adc66fe + 34e5b2d commit f07d987

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

pythonlsf/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ PROJECT = _lsf.so
1414
OBJECTS = lsf_wrap.o
1515

1616
CFLAGS = -m64 -fPIC -I$(PYTHON_INCLUDE) -I$(LSF_INCLUDE)
17-
LDFLAGS = $(LSF_LIBDIR)/liblsf.a $(LSF_LIBDIR)/libbat.a $(LSF_LIBDIR)/libfairshareadjust.so $(LSF_LIBDIR)/liblsbstream.so -lc -lnsl
17+
LDFLAGS = $(LSF_LIBDIR)/liblsf.a $(LSF_LIBDIR)/libbat.a $(LSF_LIBDIR)/libfairshareadjust.so $(LSF_LIBDIR)/liblsbstream.so -lc -lnsl -lz
1818

1919
all: $(PROJECT)
2020

pythonlsf/lsf.i

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ int fclose(FILE *f);
2727
#include "lib.table.h"
2828
extern struct gpuJobData* str2GpuJobData(char *str);
2929
%}
30+
typedef long off_t;
3031

3132
%pointer_functions(int, intp)
3233
%pointer_functions(float, floatp)

setup.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def set_gccflag_lsf_version():
6666
xlc_path = os.path.join(path, 'xlc')
6767
if os.access(xlc_path, os.F_OK):
6868
found_xlc = True
69-
os.environ["LDSHARED"] = "%s -pthread -shared -Wl,-z,relro" % xlc_path
69+
os.environ["LDSHARED"] = "%s -pthread -shared -Wl,-z,-lz,relro" % xlc_path
7070
break
7171
if found_xlc == False:
7272
print('''
@@ -90,11 +90,11 @@ def set_gccflag_lsf_version():
9090

9191
if os.access(LSF_LIBDIR + "/liblsbstream.a", os.F_OK):
9292
lsf_static_lib = [ LSF_LIBDIR + '/liblsbstream.a']
93-
lsf_dynamic_lib = ['c', 'nsl', 'rt']
93+
lsf_dynamic_lib = ['c', 'nsl', 'rt', 'z']
9494
warning_msg = ""
9595
else:
9696
lsf_static_lib = []
97-
lsf_dynamic_lib = ['c', 'nsl', 'lsbstream', 'lsf', 'bat', 'rt']
97+
lsf_dynamic_lib = ['c', 'nsl', 'lsbstream', 'lsf', 'bat', 'rt', 'z']
9898
warning_msg = '''
9999
Warning: The compatibility of the LSF Python API package is not guaranteed
100100
if you update LSF at a later time. This is because your current

0 commit comments

Comments
 (0)