Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curses6 can't be found on Debian 10; also need to validate installation process. #5

Open
unquietwiki opened this issue Feb 2, 2021 · 46 comments
Assignees
Labels
bug Something isn't working

Comments

@unquietwiki
Copy link

Hey there @dmulder ; thank you for making this, I saw it on the Samba Wiki. Trying to set it up on a Debian 10 instance; I used the Ubuntu install commands and then had to figure out the right process just to get things to compile. The remaining hangup seems to be proper detection of libcurses6

Error

CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Curses6 (missing: CURSES6_LIBRARIES)
Call Stack (most recent call first):
  /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindCurses6.cmake:25 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  /opt/admin-tools/src/libyui/buildtools/LibyuiCommon.cmake:286 (FIND_PACKAGE)
  CMakeLists.txt:66 (FIND_LIB_DEPENDENCIES)

Install process (probably need to add this to the README, if you can tell me it's valid)

sudo apt install git build-essential
git clone https://github.com/suse-samba-tools/admin-tools.git
cd admin-tools
git checkout tags/1.0
git submodule init
git submodule update
autoreconf --install
./configure

Also tried loading ncurses-6.2 to /usr/local, but that didn't seem to help.

sudo apt install wget
wget https://invisible-island.net/datafiles/release/ncurses.tar.gz
tar xvg ncurses.tar.gz
cd ncurses && ./configure --prefix=/usr/local
make install
@dmulder
Copy link
Member

dmulder commented Feb 3, 2021

Seems like I had a similar problem compiling on Ubuntu. Can't recall though.
I'll take a look at this tomorrow. Let me know if you make any progress in the meantime.

@dmulder
Copy link
Member

dmulder commented Feb 3, 2021

@unquietwiki also, there is an AppImage, fyi. In case you want something up and running quicker.
https://build.opensuse.org/package/show/home:dmulder:YaST:AppImage/admin-tools
(although it looks like the build is broken, at the moment, I'll have to look into this).

@unquietwiki
Copy link
Author

Thanks for the quick reply! I might mess around with it more later, but any further attention today will be primarily on finishing my Samba Server install in general.

@unquietwiki
Copy link
Author

@dmulder update for you of sorts: the AppImage has an interesting habit of quitting after attempts to do stuff with it. Might be related to the build issue you identified.

@dmulder
Copy link
Member

dmulder commented Feb 3, 2021

@unquietwiki I fixed the appimage build and ran it on Debian 10. Everything seems to work except the gpmc, which is crashing for some reason. I'll have to do some investigation on that.

https://appimage.github.io/admin-tools/

@dmulder
Copy link
Member

dmulder commented Feb 3, 2021

@unquietwiki if you checkout master and pull, I've fixed the curses error you were getting for Debian 10.

But you must run ./autogen.sh prior to running ./configure. The autogen.sh script does some hacky workarounds to make the build succeed.

@unquietwiki
Copy link
Author

unquietwiki commented Feb 3, 2021

@dmulder your fixes got a lot farther this time, thanks! Got a new error, but it seems to be based on a yast dependency?

sudo apt install git build-essential
git clone https://github.com/suse-samba-tools/admin-tools.git
cd admin-tools
git submodule init
git submodule update
./autogen.sh
./configure
make install
make[8]: Nothing to be done for 'install-exec-am'.
/bin/bash /opt/admin-tools/install-sh -d /usr/local/include/YaST2
 /usr/bin/install -c -p -m 644 YCP.h /usr/local/include/YaST2/YCP.h
make[8]: Leaving directory '/opt/admin-tools/src/yast-core/libycp/src/include'
make[7]: Leaving directory '/opt/admin-tools/src/yast-core/libycp/src/include'
make[6]: Leaving directory '/opt/admin-tools/src/yast-core/libycp/src/include'
make[6]: Entering directory '/opt/admin-tools/src/yast-core/libycp/src'
  CXX      Bytecode.lo
  CXX      Import.lo
  CXX      Point.lo
In file included from Point.cc:49:
./include/ycp/Scanner.h:31:10: fatal error: FlexLexer.h: No such file or directory
 #include "FlexLexer.h"
          ^~~~~~~~~~~~~
compilation terminated.
make[6]: *** [Makefile:726: Point.lo] Error 1
make[6]: Leaving directory '/opt/admin-tools/src/yast-core/libycp/src'
make[5]: *** [Makefile:751: install-recursive] Error 1

@dmulder
Copy link
Member

dmulder commented Feb 3, 2021

@unquietwiki You need to install libfl-dev.

@dmulder
Copy link
Member

dmulder commented Feb 3, 2021

You're probably going to run into an error for symbol crypt_gensalt_rn next ;)
I'm working on that one now.

@dmulder
Copy link
Member

dmulder commented Feb 3, 2021

@unquietwiki To get crypt_gensalt_rn, you'll need to install libxcrypt. I couldn't find this package for Debian 10, so I built one here: https://download.opensuse.org/repositories/home:/dmulder:/buster/Debian_10/
After installing the package, you'll need to reconfigure before building again.

@unquietwiki
Copy link
Author

unquietwiki commented Feb 3, 2021 via email

@dmulder
Copy link
Member

dmulder commented Feb 3, 2021

I also just added some build instructions to the readme, like you requested.

@dmulder
Copy link
Member

dmulder commented Feb 3, 2021

Make sure you install libjemalloc2 libjemalloc-dev.

@unquietwiki
Copy link
Author

Thanks! And yeah, that's exactly where it crashed just now. 😆

@dmulder
Copy link
Member

dmulder commented Feb 3, 2021

Well, I'm out of here for the day now. So far yast-core has succeeded, and it's moved on to building libyui.
@unquietwiki let me know if you encounter more issues (I suspect there will be more). I'll look more at this tomorrow.
Let me know if you make any additional progress while I'm out!

@unquietwiki
Copy link
Author

Thank you again for your attention to this @dmulder . BTW, I mentioned this project on Reddit yesterday; I was surprised how few watchers this had! https://www.reddit.com/r/opensource/comments/lbaeko/admintools_for_samba_ncursesbased_samba_dns/

@dmulder
Copy link
Member

dmulder commented Feb 3, 2021

FYI, these tools are pared together because they mimic MS Administrative Tools ;)

@unquietwiki
Copy link
Author

@dmulder there's no python3-samba module in Debian 10, so had to install that via pip3. Then it complained about rake missing, so I installed ruby & rake. Now I get a new error. Does it look like it's related to needing https://github.com/yast/yast-python-bindings installed?

sudo apt install python3-pip rake
pip3 install samba
make[2]: Entering directory '/opt/admin-tools/src/clients'
make[3]: Entering directory '/opt/admin-tools/src/clients'
 /usr/bin/mkdir -p '/usr/local/bin'
 /usr/bin/install -c admin-tools '/usr/local/bin'
 /usr/bin/mkdir -p '/usr/local/share/YaST2/clients'
 /usr/bin/install -c -m 644 admin-tools.py '/usr/local/share/YaST2/clients'
make[3]: Leaving directory '/opt/admin-tools/src/clients'
make[2]: Leaving directory '/opt/admin-tools/src/clients'
make[2]: Entering directory '/opt/admin-tools/src'
make[3]: Entering directory '/opt/admin-tools/src'
make DEVTOOLSBINDIR=/opt/admin-tools/src/yast-core/base/tools/devtools install-exec-hook
make[4]: Entering directory '/opt/admin-tools/src'
pushd yast-yast2; rake install && popd
/opt/admin-tools/src/yast-yast2 /opt/admin-tools/src
rake aborted!
LoadError: cannot load such file -- yast/rake
/opt/admin-tools/src/yast-yast2/Rakefile:1:in `<top (required)>'
(See full trace by running task with --trace)
make[4]: *** [Makefile:570: install-exec-hook] Error 1
make[4]: Leaving directory '/opt/admin-tools/src'
make[3]: *** [Makefile:511: install-exec-am] Error 2
make[3]: Leaving directory '/opt/admin-tools/src'
make[2]: *** [Makefile:458: install-am] Error 2
make[2]: Leaving directory '/opt/admin-tools/src'
make[1]: *** [Makefile:297: install-recursive] Error 1
make[1]: Leaving directory '/opt/admin-tools/src'
make: *** [Makefile:321: install-recursive] Error 1
root@samba-dns:/opt/admin-tools# admin-tools
Traceback (most recent call last):
  File "/usr/local/share/YaST2/clients/admin-tools.py", line 2, in <module>
    from yast import import_module
ModuleNotFoundError: No module named 'yast'

@dmulder
Copy link
Member

dmulder commented Feb 3, 2021

Just install samba to get the samba python code. I wouldn't install it from pip. I'm not sure which package Debian stores it in.
The yast module is wrapped into admin-tools.
Did you do a make install?

@unquietwiki
Copy link
Author

@dmulder I did do a make install. I'll clean / reconfigure / rebuild ; it's weird that the program was able to install, if a dependency was still in error (given how picky it's been).

@unquietwiki
Copy link
Author

Making install in clients
make[2]: Entering directory '/opt/admin-tools/src/clients'
sed -e 's;[@]Y2BASEDIR[@];/usr/local/lib/YaST2/bin;g' < admin-tools.in > admin-tools
make[3]: Entering directory '/opt/admin-tools/src/clients'
 /usr/bin/mkdir -p '/usr/local/bin'
 /usr/bin/install -c admin-tools '/usr/local/bin'
 /usr/bin/mkdir -p '/usr/local/share/YaST2/clients'
 /usr/bin/install -c -m 644 admin-tools.py '/usr/local/share/YaST2/clients'
make[3]: Leaving directory '/opt/admin-tools/src/clients'
make[2]: Leaving directory '/opt/admin-tools/src/clients'
make[2]: Entering directory '/opt/admin-tools/src'
make[3]: Entering directory '/opt/admin-tools/src'
make DEVTOOLSBINDIR=/opt/admin-tools/src/yast-core/base/tools/devtools install-exec-hook
make[4]: Entering directory '/opt/admin-tools/src'
pushd yast-yast2; rake install && popd
/opt/admin-tools/src/yast-yast2 /opt/admin-tools/src
rake aborted!
LoadError: cannot load such file -- yast/rake
/opt/admin-tools/src/yast-yast2/Rakefile:1:in `<top (required)>'
(See full trace by running task with --trace)
make[4]: *** [Makefile:570: install-exec-hook] Error 1
make[4]: Leaving directory '/opt/admin-tools/src'
make[3]: *** [Makefile:511: install-exec-am] Error 2
make[3]: Leaving directory '/opt/admin-tools/src'
make[2]: *** [Makefile:458: install-am] Error 2
make[2]: Leaving directory '/opt/admin-tools/src'
make[1]: *** [Makefile:297: install-recursive] Error 1
make[1]: Leaving directory '/opt/admin-tools/src'
make: *** [Makefile:321: install-recursive] Error 1

@dmulder
Copy link
Member

dmulder commented Feb 4, 2021

hrm, I think you have to install the rake ruby gem before that rake install command will succeed.

@unquietwiki
Copy link
Author

@dmulder gem install rake, then trying the build process again, yielded no change. 😞

@dmulder
Copy link
Member

dmulder commented Feb 4, 2021

@unquietwiki sorry, I meant the yast-rake gem:
sudo gem install yast-rake

Either way, that will only permit installing the modules. It seems you're still missing the yast python bindings. I've almost got to the point you're at, and I'll see what's going on.

@dmulder
Copy link
Member

dmulder commented Feb 4, 2021

@unquietwiki I made a little progress. The yast python code gets installed to the wrong directory on Debian.
As a work around, run:
sudo mv /usr/lib/python3.7/site-packages/* /usr/lib/python3.7/
This allows the menu to load, but then it crashes elsewhere. sigh

@dmulder
Copy link
Member

dmulder commented Feb 4, 2021

facepalm
I forgot to install Samba. It needs a relatively new version of samba, which includes the python3 samba code.

@dmulder
Copy link
Member

dmulder commented Feb 4, 2021

So, seems you'll need to either install samba from unstable sid (which is causing dependency issues for me), or self build samba. The samba version packaged with Debian 10 (4.9.5) isn't new enough for these tools.

@unquietwiki
Copy link
Author

@dmulder thanks for the effort & then suggestions. There doesn't seem to be an immediate backport; did find https://wiki.debian.org/SimpleBackportCreation, which might be useful for this context.

@unquietwiki
Copy link
Author

In the meanwhile, since I'm still at the point I can switch gears to other stuff, I am pivoting to using https://packages.debian.org/bullseye/ packages. 🔥

@unquietwiki
Copy link
Author

unquietwiki commented Feb 4, 2021

Well, updating to Debian 11 (bullseye) packages worked out, as far as surviving reboot. gcc v10 was loaded, so compilation is now failing on some things.

EDIT: I guess Samba didn't survive that.

Making install in libyui-ncurses
make[2]: Entering directory '/opt/admin-tools/src/libyui-ncurses'
make[3]: Entering directory '/opt/admin-tools/src/libyui-ncurses'
make[4]: Entering directory '/opt/admin-tools/src/libyui-ncurses'
Scanning dependencies of target yui-ncurses
make[4]: Leaving directory '/opt/admin-tools/src/libyui-ncurses'
make[4]: Entering directory '/opt/admin-tools/src/libyui-ncurses'
[  1%] Building CXX object src/CMakeFiles/yui-ncurses.dir/position.cc.o
[  2%] Building CXX object src/CMakeFiles/yui-ncurses.dir/YNCursesUI.cc.o
In file included from /opt/admin-tools/src/libyui-ncurses/src/ncursesw.h:31,
                 from /opt/admin-tools/src/libyui-ncurses/src/NCurses.h:40,
                 from /opt/admin-tools/src/libyui-ncurses/src/YNCursesUI.h:33,
                 from /opt/admin-tools/src/libyui-ncurses/src/YNCursesUI.cc:28:
/usr/include/etip.h:143:26: error: aggregate ‘NCURSES_CXX_IMPEXP NCursesPanel’ has incomplete type and cannot be defined
  143 | class NCURSES_CXX_IMPEXP NCursesPanel;
      |                          ^~~~~~~~~~~~
/usr/include/etip.h:144:26: error: aggregate ‘NCURSES_CXX_IMPEXP NCursesMenu’ has incomplete type and cannot be defined
  144 | class NCURSES_CXX_IMPEXP NCursesMenu;
      |                          ^~~~~~~~~~~
/usr/include/etip.h:145:26: error: aggregate ‘NCURSES_CXX_IMPEXP NCursesForm’ has incomplete type and cannot be defined
  145 | class NCURSES_CXX_IMPEXP NCursesForm;
      |                          ^~~~~~~~~~~
/usr/include/etip.h:147:26: error: variable ‘NCURSES_CXX_IMPEXP NCursesException’ has initializer but incomplete type
  147 | class NCURSES_CXX_IMPEXP NCursesException
      |                          ^~~~~~~~~~~~~~~~
/usr/include/etip.h:149:1: error: expected primary-expression before ‘public’
  149 | public:
      | ^~~~~~
/usr/include/etip.h:149:1: error: expected ‘}’ before ‘public’
/usr/include/etip.h:148:1: note: to match this ‘{’
  148 | {
      | ^
/usr/include/etip.h:149:1: error: expected ‘,’ or ‘;’ before ‘public’
  149 | public:
      | ^~~~~~
/usr/include/etip.h: In function ‘int NCursesException(const char*, int)’:
/usr/include/etip.h:154:7: error: only constructors take member initializers
  154 |     : message(msg), errorno (err)
      |       ^~~~~~~
/usr/include/etip.h: In function ‘int NCursesException(const char*)’:
/usr/include/etip.h:158:7: error: only constructors take member initializers
  158 |     : message(msg), errorno (E_SYSTEM_ERROR)
      |       ^~~~~~~
/usr/include/etip.h: At global scope:
/usr/include/etip.h:161:3: error: ‘NCursesException’ does not name a type
  161 |   NCursesException& operator=(const NCursesException& rhs)
      |   ^~~~~~~~~~~~~~~~
/usr/include/etip.h:167:26: error: ‘NCursesException’ does not name a type
  167 |   NCursesException(const NCursesException& rhs)
      |                          ^~~~~~~~~~~~~~~~
/usr/include/etip.h: In function ‘int NCursesException(const int&)’:
/usr/include/etip.h:168:7: error: only constructors take member initializers
  168 |     : message(rhs.message), errorno(rhs.errorno)
      |       ^~~~~~~
/usr/include/etip.h:168:19: error: request for member ‘message’ in ‘rhs’, which is of non-class type ‘const int’
  168 |     : message(rhs.message), errorno(rhs.errorno)
      |                   ^~~~~~~
/usr/include/etip.h:168:41: error: request for member ‘errorno’ in ‘rhs’, which is of non-class type ‘const int’
  168 |     : message(rhs.message), errorno(rhs.errorno)
      |                                         ^~~~~~~
/usr/include/etip.h: At global scope:
/usr/include/etip.h:172:3: error: ‘virtual’ outside class declaration
  172 |   virtual const char *classname() const {
      |   ^~~~~~~
/usr/include/etip.h:172:35: error: non-member function ‘const char* classname()’ cannot have cv-qualifier
  172 |   virtual const char *classname() const {
      |                                   ^~~~~
/usr/include/etip.h:176:28: error: expected class-name before ‘(’ token
  176 |   virtual ~NCursesException()
      |                            ^
/usr/include/etip.h:179:1: error: expected declaration before ‘}’ token
  179 | };
      | ^
/usr/include/etip.h:181:48: error: expected initializer before ‘:’ token
  181 | class NCURSES_CXX_IMPEXP NCursesPanelException : public NCursesException
      |                                                ^
/usr/include/etip.h:232:47: error: expected initializer before ‘:’ token
  232 | class NCURSES_CXX_IMPEXP NCursesMenuException : public NCursesException
      |                                               ^
/usr/include/etip.h:283:47: error: expected initializer before ‘:’ token
  283 | class NCURSES_CXX_IMPEXP NCursesFormException : public NCursesException
      |                                               ^
/usr/include/etip.h:346:25: error: ‘NCursesException’ does not name a type
  346 | inline void THROW(const NCursesException *e) {
      |                         ^~~~~~~~~~~~~~~~
In file included from /opt/admin-tools/src/libyui-ncurses/src/NCurses.h:40,
                 from /opt/admin-tools/src/libyui-ncurses/src/YNCursesUI.h:33,
                 from /opt/admin-tools/src/libyui-ncurses/src/YNCursesUI.cc:28:
/opt/admin-tools/src/libyui-ncurses/src/ncursesw.h:908:5: error: friend declaration does not name a class or function
  908 |     friend class NCursesMenu;
      |     ^~~~~~
/opt/admin-tools/src/libyui-ncurses/src/ncursesw.h:909:5: error: friend declaration does not name a class or function
  909 |     friend class NCursesForm;
      |     ^~~~~~
In file included from /opt/admin-tools/src/libyui-ncurses/src/NCurses.h:41,
                 from /opt/admin-tools/src/libyui-ncurses/src/YNCursesUI.h:33,
                 from /opt/admin-tools/src/libyui-ncurses/src/YNCursesUI.cc:28:
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h:288:1: error: expected class-name before ‘{’ token
  288 | {
      | ^
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h: In constructor ‘NCursesUserPanel<T>::NCursesUserPanel(int, int, int, int, const T*)’:
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h:300:4: error: class ‘NCursesUserPanel<T>’ does not have any field named ‘NCursesPanel’
  300 |  : NCursesPanel( lines, cols, begin_y, begin_x )
      |    ^~~~~~~~~~~~
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h:302:7: error: ‘p’ was not declared in this scope
  302 |  if ( p )
      |       ^
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h:303:6: error: there are no arguments to ‘set_user’ that depend on a template parameter, so a declaration of ‘set_user’ must be available [-fpermissive]
  303 |      set_user(( void * )p_UserData );
      |      ^~~~~~~~
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h:303:6: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h: In constructor ‘NCursesUserPanel<T>::NCursesUserPanel(const T*)’:
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h:310:57: error: class ‘NCursesUserPanel<T>’ does not have any field named ‘NCursesPanel’
  310 |     NCursesUserPanel( const T* p_UserData = ( T* )0 ) : NCursesPanel()
      |                                                         ^~~~~~~~~~~~
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h:312:7: error: ‘p’ was not declared in this scope
  312 |  if ( p )
      |       ^
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h:313:6: error: there are no arguments to ‘set_user’ that depend on a template parameter, so a declaration of ‘set_user’ must be available [-fpermissive]
  313 |      set_user(( void * )p_UserData );
      |      ^~~~~~~~
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h: In member function ‘T* NCursesUserPanel<T>::UserData() const’:
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h:323:15: error: there are no arguments to ‘get_user’ that depend on a template parameter, so a declaration of ‘get_user’ must be available [-fpermissive]
  323 |  return ( T* )get_user();
      |               ^~~~~~~~
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h: In member function ‘virtual void NCursesUserPanel<T>::setUserData(const T*)’:
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h:331:7: error: ‘p’ was not declared in this scope
  331 |  if ( p )
      |       ^
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h:332:6: error: there are no arguments to ‘set_user’ that depend on a template parameter, so a declaration of ‘set_user’ must be available [-fpermissive]
  332 |      set_user(( void * )p_UserData );
      |      ^~~~~~~~
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h: In static member function ‘static T* NCursesUserPanel<T>::UserDataOf(const PANEL&)’:
/opt/admin-tools/src/libyui-ncurses/src/ncursesp.h:340:76: error: there are no arguments to ‘get_Panel_of’ that depend on a template parameter, so a declaration of ‘get_Panel_of’ must be available [-fpermissive]
  340 |  const NCursesUserPanel<T> * p = dynamic_cast<const NCursesUserPanel<T>*>( get_Panel_of( pan ) );
      |                                                                            ^~~~~~~~~~~~
In file included from /opt/admin-tools/src/libyui-ncurses/src/YNCursesUI.h:33,
                 from /opt/admin-tools/src/libyui-ncurses/src/YNCursesUI.cc:28:
/opt/admin-tools/src/libyui-ncurses/src/NCurses.h: At global scope:
/opt/admin-tools/src/libyui-ncurses/src/NCurses.h:170:5: error: ‘NCursesPanel’ does not name a type; did you mean ‘NCursesPad’?
  170 |     NCursesPanel * stdpan;
      |     ^~~~~~~~~~~~
      |     NCursesPad
/opt/admin-tools/src/libyui-ncurses/src/NCurses.h: In member function ‘bool NCurses::initialized() const’:
/opt/admin-tools/src/libyui-ncurses/src/NCurses.h:173:39: error: ‘stdpan’ was not declared in this scope; did you mean ‘stdin’?
  173 |     bool initialized() const { return stdpan; }
      |                                       ^~~~~~
      |                                       stdin
make[4]: *** [src/CMakeFiles/yui-ncurses.dir/build.make:95: src/CMakeFiles/yui-ncurses.dir/YNCursesUI.cc.o] Error 1
make[4]: Leaving directory '/opt/admin-tools/src/libyui-ncurses'
make[3]: *** [CMakeFiles/Makefile2:225: src/CMakeFiles/yui-ncurses.dir/all] Error 2
make[3]: Leaving directory '/opt/admin-tools/src/libyui-ncurses'
make[2]: *** [Makefile:182: all] Error 2
make[2]: Leaving directory '/opt/admin-tools/src/libyui-ncurses'
make[1]: *** [Makefile:297: install-recursive] Error 1
make[1]: Leaving directory '/opt/admin-tools/src'
make: *** [Makefile:322: install-recursive] Error 1

apt install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 samba : Depends: python3-crypto but it is not installable
         Depends: libicu66 (>= 66.1-1~) but it is not installable
         Depends: libpython3.8 (>= 3.8.2) but it is not installable
E: Unable to correct problems, you have held broken packages.
root@samba-dns:/opt# apt -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

@unquietwiki
Copy link
Author

@dmulder I wiped my VM and loaded Ubuntu 20.04. Build & install instructions worked much better. Even tried adding "sudo gem install yast" after I got that error starting admin-tools, but didn't matter.

mkdir -p /var/lib/YaST2/hooks/
cp -r 'library/general/hooks/README.md' '/var/lib/YaST2/hooks/'
/usr/bin/mkdir -p //sbin
/usr/bin/ln -s /usr/sbin/yast2 //sbin/yast2
/usr/bin/ln: failed to create symbolic link '//sbin/yast2': File exists
rake aborted!
Command failed with status (1): [/usr/bin/ln -s /usr/sbin/yast2 //sbin/yast...]
/opt/admin-tools/src/yast-yast2/Rakefile:20:in `block in <top (required)>'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => install
(See full trace by running task with --trace)
make[4]: *** [Makefile:571: install-exec-hook] Error 1
make[4]: Leaving directory '/opt/admin-tools/src'
make[3]: *** [Makefile:511: install-exec-am] Error 2
make[3]: Leaving directory '/opt/admin-tools/src'
make[2]: *** [Makefile:458: install-am] Error 2
make[2]: Leaving directory '/opt/admin-tools/src'
make[1]: *** [Makefile:297: install-recursive] Error 1
make[1]: Leaving directory '/opt/admin-tools/src'
make: *** [Makefile:321: install-recursive] Error 1
# admin-tools
Traceback (most recent call last):
  File "/usr/share/YaST2/clients/admin-tools.py", line 2, in <module>
    from yast import import_module
ModuleNotFoundError: No module named 'yast'

@dmulder
Copy link
Member

dmulder commented Feb 5, 2021

@unquietwiki I'm building the latest samba for Debian 10 here: https://download.opensuse.org/repositories/home:/dmulder:/buster/Debian_10/
Should be ready in a couple hours or so, assuming all goes well.

@dmulder
Copy link
Member

dmulder commented Feb 5, 2021

Yeah, don't use gem install to install yast. The problem is just that the build is putting the yast libs in the wrong location.
Use this trick I mentioned:
sudo mv /usr/lib/python3.7/site-packages/* /usr/lib/python3.7/
I've looked through the build, and it seems like autotools is generating the wrong location (it's not hard coded or anything). Could be a bug in autoconf.

@dmulder
Copy link
Member

dmulder commented Feb 5, 2021

I'm currently testing the build in Ubuntu 20.10, fyi.

@unquietwiki
Copy link
Author

@dmulder Thanks for the update. Since my "production" thing is working, I can help test the Debian 10 stuff in a separate VM. Moving site-packages like that seems dangerous; would a symlink be a better way (move the stuff, then symlink the old dir so anything new still ends up there) ???

@dmulder
Copy link
Member

dmulder commented Feb 8, 2021

Yes, creating a symlink back would be better. I really need to figure out why the make install is putting those in the wrong directory though (maybe there is something wrong in the configure).

@dmulder
Copy link
Member

dmulder commented Feb 8, 2021

Well as per the automake docs, I'm installing the yast module in the correct directory (pyexecdir). For some reason this is broken on Ubuntu/Debian systems. This is all done under the hood too (autotools auto-magically selects this location somehow). So I'd say this is clearly a bug in either autotools, or in Debian's python search paths.

@unquietwiki
Copy link
Author

@dmulder Hello automake, my old friend...

I remember messing around with some automake stuff trying to compile something, and realizing there was a significant version difference on CentOS and Debian/Ubuntu platforms. Automake got some changes that I had to account for.

https://www.gnu.org/software/automake/manual/automake.html

@dmulder dmulder self-assigned this Feb 8, 2021
@dmulder dmulder added the bug Something isn't working label Feb 8, 2021
@unquietwiki
Copy link
Author

@dmulder Hey there. Checking in; I've had a busy month, and I hope you're doing alright.

Since I hadn't really done anything with my instance yet, I wiped & reloaded it with the GCP image for OpenSUSE 15.1, and then upgraded to 15.2. Running into an interesting git clone issue with one of the submodules.

Cloning into '/usr/src/admin-tools/tests/depends/yast2-dns-manager'...
fatal: remote error: upload-pack: not our ref 6aebc0752838b23aa92dc8bc3eb465ccd56d826f
Fetched in submodule path 'src/libyui', but it did not contain 6aebc0752838b23aa92dc8bc3eb465ccd56d826f. Direct fetching of that commit failed.

@unquietwiki
Copy link
Author

@dmulder I tried taking another look at this. I found that patch bison libtool gettext-tools cmake also need to be in the install list for OpenSUSE. I also tried the latest AppImage build, and that still doesn't work. I'm also going to ping the libyui folks on what release tag needs to happen here.

@unquietwiki
Copy link
Author

@shundhammer just pointed out some possible issues/solutions for the build issue.

libyui/libyui#6 (comment)

@dmulder
Copy link
Member

dmulder commented Mar 17, 2021

I'll have to take a look at this.

@unquietwiki
Copy link
Author

Thanks @dmulder . BTW, I did swap back to Ubuntu 20.04 LTS, since that was the "successful" SAMBA-AD install I've had thus far, and wanted to try out https://wiki.samba.org/index.php/GSOC_cockpit_samba_ad_dc#Ubuntu_20.04_Installation with it. Let me know when you need me to test something!

@dmulder
Copy link
Member

dmulder commented Oct 25, 2022

@unquietwiki I think I finally have this fixed (or close to fixed). It builds on opensuse again. More distros need testing.

@unquietwiki
Copy link
Author

@dmulder thanks for the follow-up! I guess since then, Debian 11 is now mainstream, and I no longer manage the instance I was working with back then. But I can give this a go for the next instance, or even spin up a VM to do some testing for myself. Lemme know if you want any help on that.

@dmulder
Copy link
Member

dmulder commented Oct 25, 2022

@unquietwiki I'm about to test on Ubuntu 22.10. Let me see where I get with that first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants