1

I need to use older version of linphone on Debian 12.

The version in bookworm is 4.4.10-3, and I actually need 3.12.0, which is available in Buster.

On my bookworm build machine, I changed the sources, and downloaded linphone-3.12.0 sources from buster. Then I switched sources back to bookworm, and installed any necessary dependencies.

Update with more details

I made some progress, and now I get much further in the compilation process. However, it fails eventually:

make[3]: Leaving directory '/mnt/src/deb/LINPHONE/linphone-3.12.0/obj-x86_64-linux-gnu'
[ 66%] Built target linphone-static
make[2]: Leaving directory '/mnt/src/deb/LINPHONE/linphone-3.12.0/obj-x86_64-linux-gnu'
make[1]: *** [Makefile:159: all] Error 2
make[1]: Leaving directory '/mnt/src/deb/LINPHONE/linphone-3.12.0/obj-x86_64-linux-gnu'
dh_auto_build: error: cd obj-x86_64-linux-gnu && make -j4 "INSTALL=install --strip-program=true" VERBOSE=1 returned exit code 2
make: *** [debian/rules:15: binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2

The full build output here and debian/rules here

5
  • 1
    Does this answer your question? What are the standard error codes in Linux? Commented Sep 2, 2023 at 20:07
  • What kind of compiler are you using? I would recommend using exactly the same version as in Buster. Commented Sep 4, 2023 at 7:34
  • @tukan - I am using the build tool chain from bookworm. Shouldn't the compiler be backward compatible ? Commented Sep 4, 2023 at 11:00
  • @400theCat It should be backward compatible, but it is never 100%. Commented Sep 4, 2023 at 12:43
  • gcc is backward compatible (within reason) but the other build tools may not be. Try running it in a container or virtual machine. Commented Sep 10, 2023 at 12:17

1 Answer 1

4
+500

The build fails because of

Traceback (most recent call last):
  File "/mnt/src/deb/LINPHONE/linphone-3.12.0/wrappers/cpp/genwrapper.py", line 764, in <module>
    main()
  File "/mnt/src/deb/LINPHONE/linphone-3.12.0/wrappers/cpp/genwrapper.py", line 760, in main
    genwrapper.render_all()
  File "/mnt/src/deb/LINPHONE/linphone-3.12.0/wrappers/cpp/genwrapper.py", line 700, in render_all
    self.render(header, self.includedir + '/enums.hh')
  File "/mnt/src/deb/LINPHONE/linphone-3.12.0/wrappers/cpp/genwrapper.py", line 716, in render
    with open(tmppath, mode='rU') as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU'

Python 3 no longer has a “U” mode for open(). To fix this, add debian/patches/genwrapper.patch containing

Index: linphone-3.12.0/wrappers/cpp/genwrapper.py
===================================================================
--- linphone-3.12.0.orig/wrappers/cpp/genwrapper.py
+++ linphone-3.12.0/wrappers/cpp/genwrapper.py
@@ -713,7 +713,7 @@ class GenWrapper(object):
                content = ''
                with open(tmppath, mode='w') as f:
                        f.write(self.renderer.render(item))
-               with open(tmppath, mode='rU') as f:
+               with open(tmppath, mode='r') as f:
                        content = f.read()
                with open(path, mode='w') as f:
                        f.write(content)

and add it to debian/patches/series:

$ echo genwrapper.patch >> debian/patches/series
3
  • thank you, but it fails with another error: ctxt.io/2/AABQCSbBEg Commented Sep 5, 2023 at 14:56
  • your answer solved one set of errors, but there are more. Do you know how to successfully compile linphone 3.12.0 on Debian 12 ? I will now award the bounty, since it is expiring. But the problem is not solved yet. Thank you. Commented Sep 12, 2023 at 5:25
  • Apologies, I’ve been meaning to revisit this. There’s a problem with the link order; IIRC ld became stricter sometime between Buster and Bullseye. Could you share how you worked around the FindORTP build error? Commented Sep 12, 2023 at 11:48

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.