Menu

Compilation problems against ppp-2.4.8 and ppp-2.4.9

2022-02-16
2023-09-11
  • Aleksandar Kuktin

    Basically, sstp-client fails to compile properly against either of these two. And ppp-2.4.9 is the most recent version, according to https://ppp.samba.org/ . And ppp-2.4.7 fails compiling in a more modern setting (the one lacking access to the DES algorithm) so I can't test that.

    There are two parts to this. The first is that - as far as I can tell - ppp doesn't include a pkg-config file so configure fails to discover the correct version. It defaults to 2.4.7, and when installing the package, it installs sstp-pppd-plugin.so into the wrong directory so pppd can't find it.

    The other and far more serious problem revolves around pppd/mppe.h . This header apparently didn't exist in earlier versions, and sstp-client's src/pppd-plugin/sstp-mppe.h has a branching macro which could include it, if it gets found by configure. Now, the problem is that ppp-2.4.9 has, infact, pppd/mppe.h, however it doesn't have the prototypes for the three functions required by sstp-client. Instead, it just has a bunch of unrelated macros. To make matters even worse, the three functions don't exist anywhere in ppp-2.4.9! If you grep the entire tree, they're nowhere to be found!

    Which creates the following cascade: configure tests for the existence of pppd/mppe.h and finds it. config.h then contains "#define HAVE_MPPE_H 1" which in turn makes sstp-mppe.h not include prototypes for the three functions. Compilation warnings are generated during making. Then when one attempts to load the resulting sstp-pppd-plugin.so, the loading fails because the symbols for those three functions don't exist anywhere. The final result is a complete failure to pull information out of pppd and consequently the failure of crypto binding and therefore, possibly, the inability to maintain the VPN connection for more than a 60 seconds.

    The fix for all of this would probably be to completely remove all the talk about pppd/mppe.h . However, it's possible that sstp-client's author is using some distro-hacked version of ppp, which apparently made it to version 2.4.10 - a version that doesn't exist in upstream - and this ppp has all kinds of unsavory stuff in its pppd/mppe.h . So instead of just posting a patch, I'm opening a discussion topic to try to get attention to this issue. Currently, building of sstp-client fails. :)

     
  • Aleksandar Kuktin

    Aha okay, I see that there is a newer version (1.0.16) than the one Sourceforge gave in the download button. And the new version has this HAVE_MPPE_H business figured out.

    That's awesome! xD

    I can confirm 1.0.16 still doesn't realize ppp is version 2.4.9, but it DOES figure out if pppd/mppe.h is useful or not, the macro in sstp-client's mppe.h branches correctly, making produces no warnings or errors, pppd successfully loads the plugin and crypto binding DOES work.

    So that was quick resolution to the most important problem.

    And I suppose --with-pppd-plugin-dir= can help with the other problem.

     
  • Eivind

    Eivind - 2022-02-16

    Hi Alex,

    I am glad you were able to figure it out. I am not sure which distribution you are on, but you do touch on some difficult problems with regards to distribution and upstream dependencies that hasn't made it into the specific distribution a particular user is running. Especially difficult for an maintainer of an open source project when you depend on features not yet available. This is where configure should resolve problems for you.

    I did post a patch to the Ubuntu impish distribution by Canonical, and if you could up-vote the need for this it would be great!
    https://code.launchpad.net/~eivnaes/ubuntu/+source/ppp/+git/ppp/+merge/415397

    I have submitted patches upstream to pppd project and those have been largely accepted. Unfortunately, those features are sitting in 2.4.10 pending release. I have a few more patches needed for this to happen I think, just not much time to work on it. One of the large patches I submitted was to enable configure / autotools on the project.

    If you are interested in trying the latest of pppd for Ubuntu, you could try the following recipe here, this assumes you already have development tools for Ubuntu installed.

    apt-get source ppp
    cd ppp-2.4.9
    patch -p1 -i patch-file-name.patch
    dpkg-buildpackage -us -uc 
    cd ../
    
    sudo dpkg --install *.deb
    
    apt-get source sstp-client
    cd sstp-client-1.0.16
    dpkg-buildpackage -us -uc
    cd ..
    sudo dpkg --install libsstp*.deb sstp-*.deb
    
    apt-get source network-manager-sstp
    cd network-manager-sstp-1.2.6
    dpkg-buildpackage -us -uc 
    cd ../
    sudo dpkg --install network-manager*.deb
    
     
  • Eivind

    Eivind - 2022-02-16

    If you use network-manager-* project or other packages that depends on pppd, then you'd have to recompile these too. Unfortunately, if Ubuntu release updates to these packages you'll have to go through these steps again.

     
  • Eivind

    Eivind - 2022-02-25

    Hello,

    The patch that I created was finally taken into the 22.04 release (Jammy Jellyfish) coming up to be released in mid-April 2022.

    That should allow packages to work again.

     
  • Eivind

    Eivind - 2023-06-12

    It was never a 2.4.10 releaese of pppd. However, the latest release of ppp-2.5.0 should work. Though you are correct John Harry, Debian or Ubuntu won't take the latest release of this for a while.

     

Log in to post a comment.