ipkn / crow

Crow is very fast and easy to use C++ micro web framework (inspired by Python Flask)
BSD 3-Clause "New" or "Revised" License
7.46k stars 889 forks source link

Error when build the library #368

Closed amrkamal2025 closed 4 years ago

amrkamal2025 commented 4 years ago

I get this strange error Windows 10 Boost 1.69 QT MinGW 64 7.3.0

D:\cook\crow\crow\build>mingw32-make
Scanning dependencies of target amalgamation
[  4%] Generating amalgamate/crow_all.h
['include\\crow.h', 'crow/include\\crow\\app.h', 'crow/include\\crow\\ci_map.h', 'crow/include\\crow\\common.h', 'crow/include\\crow\\dumb_timer_queue.h', 'crow/include\\crow\\http_connection.h', 'crow/include\\crow\\http_parser_merged.h', 'crow/include\\crow\\http_request.h', 'crow/include\\crow\\http_response.h', 'crow/include\\crow\\http_server.h', 'crow/include\\crow\\json.h', 'crow/include\\crow\\logging.h', 'crow/include\\crow\\middleware.h', 'crow/include\\crow\\middleware_context.h', 'crow/include\\crow\\mustache.h', 'crow/include\\crow\\parser.h', 'crow/include\\crow\\query_string.h', 'crow/include\\crow\\routing.h', 'crow/include\\crow\\settings.h', 'crow/include\\crow\\socket_adaptors.h', 'crow/include\\crow\\TinySHA1.hpp', 'crow/include\\crow\\utility.h', 'crow/include\\crow\\websocket.h']
Traceback (most recent call last):
  File "D:/cook/crow/crow/amalgamate/merge_all.py", line 19, in <module>
    d = open(pt.join(header_path, header)).read()
FileNotFoundError: [Errno 2] No such file or directory: 'D:/cook/crow/crow/include\\include\\crow.h'
mingw32-make[2]: *** [CMakeFiles\amalgamation.dir\build.make:61: amalgamate/crow_all.h] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:72: CMakeFiles/amalgamation.dir/all] Error 2
mingw32-make: *** [Makefile:94: all] Error 2
mrozigor commented 4 years ago

Maybe try temporarily change paths in merge_all.py:14-15 from / to \?

amrkamal2025 commented 4 years ago

I change it on line 14 and 15 now it be

headers = [x.rsplit('\\', 1)[-1] for x in glob(pt.join(header_path, '*.h*'))]
headers += ['crow\\' + x.rsplit('\\', 1)[-1] for x in glob(pt.join(header_path, 'crow\\*.h*'))]

but i got this error this time


Scanning dependencies of target amalgamation
[  4%] Generating amalgamate/crow_all.h
['crow.h', 'crow\\app.h', 'crow\\ci_map.h', 'crow\\common.h', 'crow\\dumb_timer_queue.h', 'crow\\http_connection.h', 'crow\\http_parser_merged.h', 'crow\\http_request.h', 'crow\\http_response.h', 'crow\\http_server.h', 'crow\\json.h', 'crow\\logging.h', 'crow\\middleware.h', 'crow\\middleware_context.h', 'crow\\mustache.h', 'crow\\parser.h', 'crow\\query_string.h', 'crow\\routing.h', 'crow\\settings.h', 'crow\\socket_adaptors.h', 'crow\\TinySHA1.hpp', 'crow\\utility.h', 'crow\\websocket.h']
crow/query_string.h ['crow.h', 'crow\\http_request.h']
crow/http_parser_merged.h ['crow.h', 'crow\\http_connection.h', 'crow\\parser.h']
crow/ci_map.h ['crow.h', 'crow\\http_request.h', 'crow\\http_response.h']
crow/TinySHA1.hpp ['crow.h', 'crow\\websocket.h']
crow/settings.h ['crow.h', 'crow\\app.h', 'crow\\http_connection.h', 'crow\\json.h', 'crow\\logging.h', 'crow\\socket_adaptors.h', 'crow\\utility.h']
crow/socket_adaptors.h ['crow.h', 'crow\\http_connection.h', 'crow\\websocket.h']
crow/json.h ['crow.h', 'crow\\http_response.h', 'crow\\mustache.h']
crow/mustache.h ['crow.h']
crow/logging.h ['crow.h', 'crow\\app.h', 'crow\\dumb_timer_queue.h', 'crow\\http_connection.h', 'crow\\http_server.h', 'crow\\routing.h']
crow/dumb_timer_queue.h ['crow.h', 'crow\\http_connection.h', 'crow\\http_server.h']
crow/utility.h ['crow.h', 'crow\\app.h', 'crow\\common.h', 'crow\\middleware_context.h', 'crow\\routing.h']
crow/common.h ['crow.h', 'crow\\http_request.h', 'crow\\routing.h']
crow/http_request.h ['crow.h', 'crow\\app.h', 'crow\\http_response.h', 'crow\\middleware.h', 'crow\\middleware_context.h', 'crow\\parser.h', 'crow\\routing.h', 'crow\\websocket.h']
crow/websocket.h ['crow.h', 'crow\\routing.h']
crow/parser.h ['crow.h', 'crow\\http_connection.h']
crow/http_response.h ['crow.h', 'crow\\http_connection.h', 'crow\\middleware.h', 'crow\\middleware_context.h', 'crow\\routing.h']
crow/middleware.h ['crow.h']
crow/routing.h ['crow.h', 'crow\\app.h']
crow/middleware_context.h ['crow.h', 'crow\\app.h', 'crow\\http_connection.h']
crow/http_connection.h ['crow.h', 'crow\\http_server.h']
crow/http_server.h ['crow.h', 'crow\\app.h']
crow/app.h ['crow.h']
crow.h []
crow\app.h []
crow\ci_map.h []
crow\common.h []
crow\dumb_timer_queue.h []
crow\http_connection.h []
crow\http_parser_merged.h []
crow\http_request.h []
crow\http_response.h []
crow\http_server.h []
crow\json.h []
crow\logging.h []
crow\middleware.h []
crow\middleware_context.h []
crow\mustache.h []
crow\parser.h []
crow\query_string.h []
crow\routing.h []
crow\settings.h []
crow\socket_adaptors.h []
crow\TinySHA1.hpp []
crow\utility.h []
crow\websocket.h []
Traceback (most recent call last):
  File "D:/cook/crow/crow/amalgamate/merge_all.py", line 46, in <module>
    assert order.index(x) < order.index(y), 'cyclic include detected'
ValueError: 'crow/query_string.h' is not in list
mingw32-make[2]: *** [CMakeFiles\amalgamation.dir\build.make:61: amalgamate/crow_all.h] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:72: CMakeFiles/amalgamation.dir/all] Error 2
mingw32-make: *** [Makefile:94: all] Error 2
mrozigor commented 4 years ago

Maybe try to replace line edges[m].append(header) with edges[m.replace("/", "\\")].append(header)?