Menu

#299 xfe 2.1 fails to compile on FreeBSD 14.2 due to undefined identifiers

v1.0_(example)
closed-fixed
nobody
None
5
2025-05-30
2025-05-20
ehaupt
No

Description:

When attempting to build xfe 2.1 on FreeBSD 14.2, the compilation fails with several errors related to undefined identifiers. These appear to stem from missing macro or variable definitions likely dependent on platform-specific headers or UI components.

File.cpp:153:22: error: use of undeclared identifier 'MOUNT'
File.cpp:153:44: error: use of undeclared identifier 'UNMOUNT'
Preferences.cpp:564:5: error: use of undeclared identifier 'spinner'
Preferences.cpp:566:5: error: use of undeclared identifier 'spinner'
Preferences.cpp:568:5: error: use of undeclared identifier 'spinner'
Preferences.cpp:570:5: error: use of undeclared identifier 'spinner'

Discussion

  • Roland Baudin

    Roland Baudin - 2025-05-21

    OK, I fixed these issues. However, I was not able to compile Xfe in a FreeBSD VM. A screenshot of the error is attached. I also attach a pre-version of Xfe 2.1.1, if you want to test.

     
    • Roland Baudin

      Roland Baudin - 2025-05-21

      Pre-version of XFe 2.1.1 with FreeBSD compilation issues fixed.

       

      Last edit: Roland Baudin 2025-05-21
  • ehaupt

    ehaupt - 2025-05-23

    Hello @baudinr, thanks for looking into it. I can confirm that your pre-version 2.1.1 solves the compiler issue.

    The error in your screenshot comes from the usage of bsd make (make) instead of gmake. The ports framework is taking care of this with the gmake USES macro.

     

    Last edit: ehaupt 2025-05-23
    • Roland Baudin

      Roland Baudin - 2025-05-27

      OK, thanks. I managed to compile Xfe in FreeBSD but now it crashes at launch and valgrind tells me the error is in PathLinker.cpp at line 30:

      std::stringstream ss;

      This works fine (for years) in Linux. Do you have any idea about this error?

       
  • ehaupt

    ehaupt - 2025-05-28

    The FreeBSD ports framework applies some additional macros. The entire magic is in:

    https://cgit.freebsd.org/ports/tree/x11-fm/xfe

    The patches in files/ have already been reported and incorporated (separate PR).

    Have a look at the Makefile:

    https://cgit.freebsd.org/ports/tree/x11-fm/xfe/Makefile

    The USES macros do some magic. The ones addressing the issues you're seeing are probably:

    • localbase (adding -I${PREFIX}/include) to CFLAGS (3rd party libraries on FreeBSD are per default under /usr/local/include

    • pathfix (fixes some hardcoded linux paths)

    What exactly each macro does can be found here:

    https://cgit.freebsd.org/ports/tree/Mk/Uses

    We're also adding -pthread to LDFLAGS.

    Here is a preview of the ports tree for the 2.1.1 tar file you've posted:

    https://critical.ch/people/xfe-ports-preview

    If you like to test it you can update your ports tree. Go to ports/x11-fm/xfe, delete all files within and replace them with the preview files, place your tarball into /usr/ports/distfiles and run:

    $ make install clean in ports/x11-fm/xfe

    It builds a functional version in my setup.

     

    Last edit: ehaupt 2025-05-28
    • Roland Baudin

      Roland Baudin - 2025-05-28

      Thanks for the explanations, however I didn't succeed :-(
      But that's not a problem, if you managed to build and run Xfe in FreeBSD, that's OK for me!

       
  • Roland Baudin

    Roland Baudin - 2025-05-30
    • status: open --> closed-fixed
     

Log in to post a comment.

Auth0 Logo