I believe the audience for this post is quite small, if not actually non-existent, but anyway.....
MOSS builds on Ubuntu 20.04, with the following caveats:
Note: Any modifications that I made to get things to work are not necessarily the "correct" ones. I am not a C expert, and so YMMV.
1. Compile error in Logger.h.
Code: Select all
make all-am
make[1]: Entering directory '/home/moss/moss'
depbase=`echo dispatcher.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I/usr/include/postgresql -pthread -g -O2 -MT dispatcher.o -MD -MP -MF $depbase.Tpo -c -o dispatcher.o dispatcher.cc &&\
mv -f $depbase.Tpo $depbase.Po
In file included from dispatcher.cc:92:
Logger.h: In function ‘std::string methodName(const char*)’:
Logger.h:188:3: error: ‘uint_t’ was not declared in this scope; did you mean ‘wint_t’?
188 | uint_t lvl = 1;
| ^~~~~~
| wint_t
Logger.h:189:10: error: ‘lvl’ was not declared in this scope
189 | while (lvl > 0 && end >= 0) {
| ^~~
make[1]: *** [Makefile:908: dispatcher.o] Error 1
make[1]: Leaving directory '/home/moss/moss'
make: *** [Makefile:596: all] Error 2
2. Compile error and deprecation warning in SDL.cc
Code: Select all
make all-am
make[1]: Entering directory '/home/moss/moss'
depbase=`echo SDL.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/usr/include/postgresql -pthread -g -O2 -MT SDL.lo -MD -MP -MF $depbase.Tpo -c -o SDL.lo SDL.cc &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/include/postgresql -pthread -g -O2 -MT SDL.lo -MD -MP -MF .deps/SDL.Tpo -c SDL.cc -fPIC -DPIC -o .libs/SDL.o
In file included from SDL.cc:55:
SDL.h: In constructor ‘SDLDesc::Variable::Variable(SDLDesc::sdl_type_t)’:
SDL.h:78:7: error: ‘memset’ was not declared in this scope
78 | memset(&m_default, 0, sizeof(m_default));
| ^~~~~~
SDL.h:1:1: note: ‘memset’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
+++ |+#include <cstring>
1 | /* -*- c++ -*- */
SDL.cc: In constructor ‘SDLDesc::SDLDesc(const string&)’:
SDL.cc:61:3: error: ‘memcpy’ was not declared in this scope
61 | memcpy(m_name, name.c_str(), name.length()+1);
| ^~~~~~
SDL.cc:56:1: note: ‘memcpy’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
55 | #include "SDL.h"
+++ |+#include <cstring>
56 |
SDL.cc: In static member function ‘static SDLDesc* SDLDesc::find_by_name(const char*, const std::__cxx11::list<SDLDesc*>&, u_int)’:
SDL.cc:84:9: error: ‘strlen’ was not declared in this scope
84 | if (strlen(desc->name()) == strlen(name)
| ^~~~~~
SDL.cc:84:9: note: ‘strlen’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
SDL.cc: In function ‘char* f_dirent(dirent*)’:
SDL.cc:118:39: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘__ino_t’ {aka ‘long unsigned int’} [-Wformat=]
118 | snprintf(out, sizeof(out), "{ino=%u name=%s}", d->d_ino, d->d_name);
| ~^ ~~~~~~~~
| | |
| unsigned int __ino_t {aka long unsigned int}
| %lu
SDL.cc: In static member function ‘static int SDLDesc::parse_directory(Logger*, std::__cxx11::list<SDLDesc*>&, std::string&, bool, bool)’:
SDL.cc:132:83: error: ‘strerror’ was not declared in this scope
132 | Cannot open directory %s for listing: %s\n", dirname.c_str(), strerror(errno));
| ^~~~~~~~
SDL.cc:143:46: warning: ‘int readdir_r(DIR*, dirent*, dirent**)’ is deprecated [-Wdeprecated-declarations]
143 | while ((ret = readdir_r(dir, entry, &result)) == 0) {
| ^
In file included from SDL.cc:33:
/usr/include/dirent.h:183:12: note: declared here
183 | extern int readdir_r (DIR *__restrict __dirp,
| ^~~~~~~~~
SDL.cc:143:46: warning: ‘int readdir_r(DIR*, dirent*, dirent**)’ is deprecated [-Wdeprecated-declarations]
143 | while ((ret = readdir_r(dir, entry, &result)) == 0) {
| ^
In file included from SDL.cc:33:
/usr/include/dirent.h:183:12: note: declared here
183 | extern int readdir_r (DIR *__restrict __dirp,
| ^~~~~~~~~
SDL.cc:147:15: error: ‘strlen’ was not declared in this scope
147 | int ret = strlen(result->d_name);
| ^~~~~~
SDL.cc:147:15: note: ‘strlen’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
SDL.cc:173:71: error: ‘strerror’ was not declared in this scope
173 | err(log, "Error reading directory %s: %s\n", dirname.c_str(), strerror(errno));
| ^~~~~~~~
/snip - the entire output is too long for the forum
I changed it back, and it was happy.
The change that introduced the deprecation warning was in the same commit as above, and the developers have determined that it is safe to ignore.
3. Compile errors and deprecation warnings in db_requests.h.
Code: Select all
make all-am
make[1]: Entering directory '/home/moss/moss'
depbase=`echo backend_all.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I/usr/include/postgresql -pthread -g -O2 -MT backend_all.o -MD -MP -MF $depbase.Tpo -c -o backend_all.o backend_all.cc &&\
mv -f $depbase.Tpo $depbase.Po
In file included from backend_all.cc:89:
db_requests.h: In constructor ‘AuthAcctLogin_AcctQuery::AuthAcctLogin_AcctQuery(const char*, AuthAcctLogin_AcctQuery_Result&)’:
db_requests.h:234:36: warning: ‘pqxx::transactor<TRANSACTION>::transactor(const string&) [with TRANSACTION = pqxx::transaction<>; std::string = std::__cxx11::basic_string<char>]’ is deprecated [-Wdeprecated-declarations]
234 | m_name(name), m_result(result)
| ^
In file included from /usr/include/pqxx/transactor:6,
from /usr/include/pqxx/pqxx:19,
from backend_all.cc:50:
/usr/include/pqxx/transactor.hxx:160:28: note: declared here
160 | PQXX_DEPRECATED explicit transactor( //[t04]
| ^~~~~~~~~~
In file included from backend_all.cc:89:
db_requests.h: In copy constructor ‘AuthAcctLogin_AcctQuery::AuthAcctLogin_AcctQuery(const AuthAcctLogin_AcctQuery&)’:
db_requests.h:239:52: warning: ‘pqxx::transactor<TRANSACTION>::transactor(const string&) [with TRANSACTION = pqxx::transaction<>; std::string = std::__cxx11::basic_string<char>]’ is deprecated [-Wdeprecated-declarations]
239 | m_name(other.m_name), m_result(other.m_result)
| ^
In file included from /usr/include/pqxx/transactor:6,
from /usr/include/pqxx/pqxx:19,
from backend_all.cc:50:
/usr/include/pqxx/transactor.hxx:160:28: note: declared here
160 | ( //[t04]
| ^~~~~~~~~~
In file included from backend_all.cc:89:
db_requests.h: In member function ‘void AuthAcctLogin_AcctQuery::operator()(pqxx::transactor<>::argument_type&)’:
db_requests.h:256:21: error: ‘field’ is not a member of ‘pqxx::result’
256 | pqxx::result::field F = R[0]["hash"];
| ^~~~~
db_requests.h:258:18: error: ‘F’ was not declared in this scope
258 | if (strlen(F.c_str()) != 40) {
| ^
db_requests.h:262:20: error: ‘F’ was not declared in this scope
262 | memcpy(hash, F.c_str(), 41);
| ^
/snip - the entire output is too long for the forum
I changed all occurrences of pqxx::result::field to pqxx::field
pqxx 6.4.5 has deprecated Transactor, so expect this to become an error in the future.
For creating manifests and such, I recommend using the UruManifest utility at https://github.com/Hoikas/UruManifest. I received warnings from MOSS when I followed the SDL file location advice in the README.md file, but it is very trivial to move the SDLs into the directory structure recommended in the MOSS in-tree "setup" document if you like. MOSS still works, either way you do it. I just dislike seeing warnings and errors.
You can also use the old in-tree ManifestCreator tool to generate the manifests, but the UruManifest tool is vastly superior. The UruManifest tool also has the added advantage that it also generates manifests for the H'uru dirtsand server, so it is basically a "one stop shop" for generating manifests, no matter which server you decide to use.
Note to OU staff: You can remove my ManifestCreator tool from the MOSS tree and update the instructions to send users to UruManifest, if you want. The ManifestCreator tool was sufficient at the time, but it is written in an obscure language and will not be receiving any updates.
Happy Uru-ing!