Code Monkey home page Code Monkey logo

Comments (12)

pvdb458 avatar pvdb458 commented on July 29, 2024 1

I am using v0.8.x branch while building the module, and I am not seeing these issues.

Here are the commands of which I use.

yum install -y gcc unzip wget make autoconf automake libtool mariadb-devel pam-devel

(within the base dir)
autoreconf -f -i 
./configure --with-cyrus-sasl2 --with-openssl --with-pam-mods-dir=/lib64/security/
make
make install

Not sure what is going wrong. But maybe these commands work for you.

from pam-mysql.

darklinkworker avatar darklinkworker commented on July 29, 2024 1

Yes, I was able to get the build to work.
if you omit any of these parameters [--with-cyrus-sasl2, --with-openssl, --with-pam-mods-dir=/lib64/security/] on the ./configure line it bombs out. The INSTALL file says they are not required, but it didn't work without them. This line below is what work for centos7
./configure --with-cyrus-sasl2 --with-openssl --with-pam-mods-dir=/lib64/security/

from pam-mysql.

darklinkworker avatar darklinkworker commented on July 29, 2024

here is the full dump from
./configure --with-pam=/usr/include/security/ --with-pam-mods-dir=/usr/lib64/security/ checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking how to print strings... printf checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking dependency style of gcc... gcc3 checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for mt... no checking if : is a manifest tool... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking dependency style of gcc... (cached) gcc3 checking size of short... 2 checking size of int... 4 checking size of long... 8 checking arpa/inet.h usability... yes checking arpa/inet.h presence... yes checking for arpa/inet.h... yes checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking netdb.h usability... yes checking netdb.h presence... yes checking for netdb.h... yes checking for string.h... (cached) yes checking for strings.h... (cached) yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking for sys/types.h... (cached) yes checking for sys/stat.h... (cached) yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking for unistd.h... (cached) yes checking stdarg.h usability... yes checking stdarg.h presence... yes checking for stdarg.h... yes checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking crypt.h usability... yes checking crypt.h presence... yes checking for crypt.h... yes checking security/pam_appl.h usability... yes checking security/pam_appl.h presence... yes checking for security/pam_appl.h... yes checking for size_t... yes checking whether ELOOP is declared... yes checking whether EOVERFLOW is declared... yes checking for library containing socket... none required checking for getaddrinfo... yes checking PF_INET6 availability... yes checking for struct sockaddr_in6... yes checking for struct in6_addr... yes checking for gethostbyname_r... yes checking if gethostbyname_r() is part of glibc... yes checking if /usr /usr/local /usr/mysql /opt/mysql is a mysql_config script... no checking mysql_config availability in /usr/bin... yes checking for mysql_real_query... yes checking for mysql_real_escape_string... yes checking for make_scrambled_password_323... yes checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for openssl... yes configure: error: Cannot find pam headers. Please check if your system is ready for pam module development.

from pam-mysql.

darklinkworker avatar darklinkworker commented on July 29, 2024

I had everything from the yum command install "yum install -y gcc unzip wget make autoconf automake libtool mariadb-devel pam-devel"
but we had different parameters for ./configure.
Either way ./configure --with-cyrus-sasl2 --with-openssl --with-pam-mods-dir=/lib64/security/ worked!
It built with out issues.
Thank You for the quick help.
I went ahead and changed switch out some of ./configure parameters. If you drop the --with-pam-mods-dir it errors out saying
"configure: error: Your system doesn't appear to be configured to use PAM. Perhaps you need to specify the correct location where the PAM modules reside."
In the INSTALL file it says it can be omitted but I guest not since it doesn't work without it.

from pam-mysql.

NigelCunningham avatar NigelCunningham commented on July 29, 2024

@darklinkworker apologies for the delay in getting back to you. Did you succeed in getting the build to work? If so, what adjustments were needed? (Perhaps we can update the INSTALL file).

from pam-mysql.

alphanoob1337 avatar alphanoob1337 commented on July 29, 2024

I am also using CentOS 7. But for me the previously discussed
./configure --with-cyrus-sasl2 --with-openssl --with-pam_mods_dir=/usr/lib64/security
fails on my system with the following error:

...
checking if md5.h is derived from Cyrus SASL Version 1... no
checking md5.h usability... no
checking md5.h presence... no
checking for md5.h... no
checking if md5.h is Solaris's... no
checking for md5.h... (cached) no
checking for MD5Data... no
checking for library containing crypt... no
configure: error: unable to find the crypt() function

Probably I need to install something. I tried a few packages like mcrypt, libmcrypt or perl-Crypt. I was able to locate a crypt.h in /usr/include. However --with-sysroot=/usr/include or --with-sysroot=/usr did not solve the problem.

from pam-mysql.

NigelCunningham avatar NigelCunningham commented on July 29, 2024

I would try something like "yum whatprovides md5.h" (going off https://stackoverflow.com/questions/1133495/how-do-i-find-which-rpm-package-supplies-a-file-im-looking-for).

from pam-mysql.

alphanoob1337 avatar alphanoob1337 commented on July 29, 2024

I did yum whatprovides "*/md5.h". The (long) resulting list includes the packages openssl-devel as well as cyrus-sasl-devel, which I both have installed previously. They reside in /usr/include/openssl/md5.h respectively /usr/include/sasl/md5.h. None of the packages on the list install a md5.h into /usr/include.

from pam-mysql.

Thue avatar Thue commented on July 29, 2024

I have the same problem on CentOS 7. I were able to compile and link a little test program using crypt, but I get the same "configure: error: unable to find the crypt() function" as alphanoob1337 when trying to configure pam-MySQL.

Doing "rpmbuild --rebuild pam_mysql-0.8.1-0.4.el6.wolfy.src.rpm" on the srpm from https://wolfy.fedorapeople.org/ gives the same error.

Installing the package MariaDB-shared makes the line change to

checking for library containing crypt... none required

Also, commenting out the crypt line from configure.ac, the Make command fails unable to find -lmariadb. So it seems that the crypt line in configure.ac somehow only exists to check for the mariadb lib? Why was it not able to detect that crypt existed in other libraries, like my test program mentioned above?

from pam-mysql.

Thue avatar Thue commented on July 29, 2024

Ah. The problem seems to be that the configure linker gets passed a LIBS var which includes -lmariadb. So the crypt function exists and works fine, but the configure test fails because the mariadb library is not found.

So the solution is obviously to add an explicit test for -lmariadb before the crypt test. And perhaps even to suggest in the error message to install the MariaDB-shared package. And perhaps even to add a few lines to the README with the required packages and configure arguments for CentOS.

from pam-mysql.

Thue avatar Thue commented on July 29, 2024

Investigating further, the MariaDB-shared only exists in the MariaDB repository, and not in base CentOS 7. And if I don't have the MariaDB repository added, then everything works fine without the MariaDB-shared package.

I assume that there is some kind of bug with the PAM_MYSQL_CHECK_LIBMYSQLCLIENT macro, causing it to add the -lmariadb library to the library list. But that macro is a bit too hairy for me to debug right now.

from pam-mysql.

NigelCunningham avatar NigelCunningham commented on July 29, 2024

I've since change the build to use Meson so I'll close this issue.

from pam-mysql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.