Menu

#172 How to solve the "boost library not found" in cross compile?

open
nobody
None
5
2022-09-25
2022-09-21
Deqing Sun
No

Hi,

Since the windows compiling farm is down, I'm searching for ways to build my own SDCC binary. I've used colab to build linux binary successfully.

However when I tried to build with mingw, I always get configure: error: boost library not found (boost/graph/adjacency_list.hpp). error.

https://colab.research.google.com/drive/13ntGIrvbjOACAf6Oc4rOu9vIJKQqxKaB?usp=sharing

The /usr/include/boost/graph/adjacency_list.hpp exists so apt-get install libboost-system-dev will not do anything. I also tried to add path to CPPFLAGS or CXXFLAGS with no luck.

Is there anything else I can try?

Thanks

Discussion

  • Philipp Klaus Krause

    You could try to put the additional include path in the CXX command, like this example for OpenBSD shows:
    https://sourceforge.net/p/sdcc/wiki/OpenBSD/

     
    • Deqing Sun

      Deqing Sun - 2022-09-21

      Thank you for your help.
      After checking config.log. The boost library was actually found. There was an error

      fatal error: bits/libc-header-start.h: No such file or directory
      

      But if the /usr/include/x86_64-linux-gnu/bits/libc-header-start.h get included. It generate conflicting error such as

      In file included from /usr/include/inttypes.h:27:0,
                       from test.cpp:35:
      /usr/include/stdint.h:116:0: warning: "__INT64_C" redefined
       #  define __INT64_C(c) c ## L
      
      <built-in>: note: this is the location of the previous definition
      In file included from /usr/include/inttypes.h:27:0,
                       from test.cpp:35:
      /usr/include/stdint.h:117:0: warning: "__UINT64_C" redefined
       #  define __UINT64_C(c) c ## UL
      
      <built-in>: note: this is the location of the previous definition
      In file included from test.cpp:26:0:
      /usr/include/stdio.h:71:19: error: conflicting declaration typedef __ssize_t ssize_t
       typedef __ssize_t ssize_t;
                         ^~~~~~~
      In file included from /usr/share/mingw-w64/include/stddef.h:7:0,
                       from /usr/lib/gcc/x86_64-w64-mingw32/7.3-win32/include/stddef.h:1,
                       from test.cpp:24:
      /usr/share/mingw-w64/include/crtdefs.h:45:35: note: previous declaration as typedef long long int ssize_t
       __MINGW_EXTENSION typedef __int64 ssize_t;
                                         ^~~~~~~
      In file included from /usr/include/sys/types.h:130:0,
                       from /usr/include/stdlib.h:394,
                       from test.cpp:29:
      /usr/include/bits/types/time_t.h:7:18: error: conflicting declaration typedef __time_t time_t
       typedef __time_t time_t;
      

      I really hope there is a windows compiling example that works.

       
      • Deqing Sun

        Deqing Sun - 2022-09-25

        It seems other files in /usr/include/ should not be included.
        Copy boost folder into another place and include, then it can pass the "boost library not found"

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.