--- src/SConstruct	2021-05-17 10:52:36.910193982 +0000
+++ src/SConstruct	2021-05-17 10:53:54.856878859 +0000
@@ -155,6 +155,7 @@
 env = Environment(variables=opts,
                   tools=('default', 'textfile',),
                   CPPPATH=['.', ],
+                  PLATFORM='posix'
                   )
 
 env.Append(BUILDERS = {
@@ -166,7 +167,7 @@
 match = re.search('SERF_MAJOR_VERSION ([0-9]+).*'
                   'SERF_MINOR_VERSION ([0-9]+).*'
                   'SERF_PATCH_VERSION ([0-9]+)',
-                  env.File('serf.h').get_contents(),
+                  str(env.File('serf.h').get_contents()),
                   re.DOTALL)
 MAJOR, MINOR, PATCH = [int(x) for x in match.groups()]
 env.Append(MAJOR=str(MAJOR))
@@ -183,7 +184,7 @@
 
 unknown = opts.UnknownVariables()
 if unknown:
-  print 'Warning: Used unknown variables:', ', '.join(unknown.keys())
+  print('Warning: Used unknown variables:', ', '.join(unknown.keys()))
 
 apr = str(env['APR'])
 apu = str(env['APU'])
@@ -216,7 +217,8 @@
 # from current_version, so don't use the PATCH level to avoid that build and
 # runtime patch levels have to be identical.
 if sys.platform != 'sunos5':
-  env['SHLIBVERSION'] = '%d.%d.%d' % (MAJOR, MINOR, 0)
+  #env['SHLIBVERSION'] = '%d.%d.%d' % (MAJOR, MINOR, 0)
+  env['SHLIBSUFFIX'] = '.so'
 
 LIBNAME = 'libserf-%d' % (MAJOR,)
 if sys.platform != 'win32':
