opnsense / ports

OPNsense ports on top of FreeBSD
https://opnsense.org/
Other
157 stars 114 forks source link

Squid(4.13) build error on OPNsense 20.7.4 #104

Closed jcem closed 3 years ago

jcem commented 3 years ago

I'm a newbie on OPNsense & currently reviewing the system. So If I don't know something, let me know please.

*** my purpose I want squid(WebProxy) to act as a reverse proxy. Because I need the c-icap module and that module is not supported from the reverse proxies(HAproxy or Nginix). Am I right? or Right direction?

*** this my first squid build & I don't know I'm doing properly. I encountered 2 errors during the squid build.

First error was solved like below, maybe. Second error was not solved & I need the help.

*** first squid build error => I 'm thinking I solved this problem by changing /etc/make.conf

error message

squid You are using OpenSSL from ports and have selected GSSAPI from base please select another GSSAPI value ===> squid-4.13 You are using OpenSSL from ports and have selected GSSAPI from base, please select another GSSAPI value. *** Error code 1

Stop. make: stopped in /usr/ports/www/squid

*** my solution

vi /etc/make.conf ALLOW_UNSUPPORTED_SYSTEM=yes DEFAULT_VERSIONS+=ssl=openssl OPTIONS_UNSET+=GSSAPI_BASE OPTIONS_SET+=GSSAPI_NONE

OPTIONS_SET+=GSSAPI_MIT

*** second squid build error => I'm stucked on this error & I included short error log below, see the attached file for full log file. squid.build.full.log.txt

error message

Making all in NIS ... /bin/sh ../../../../libtool --tag=CXX --mode=link c++ -D_REENTRANT -I/usr/local/include -O2 -pipe -DHARDENEDBSD -fPIE -fPIC -mretpoline -fsanitize=safe-stack -fstack-protector-all -fno-strict-aliasing -DHARDENEDBSD -fPIE -fPIC -mretpoline -fsanitize=safe-stack -I/usr/local/include -pthread -L/usr/local/lib -lpcreposix -lpcre -pie -Wl,-z,relro -Wl,-z,now -fsanitize=safe-stack -Wl,-rpath,/usr/local/lib -fstack-protector-all -L/usr/local/lib -Wl,-R/usr/local/lib -o basic_nis_auth basic_nis_auth.o nis_support.o ../../../../lib/libmiscencoding.la ../../../../compat/libcompatsquid.la -lcrypt libtool: link: c++ -D_REENTRANT -I/usr/local/include -O2 -pipe -DHARDENEDBSD -fPIE -fPIC -mretpoline -fsanitize=safe-stack -fstack-protector-all -fno-strict-aliasing -DHARDENEDBSD -fPIE -fPIC -mretpoline -fsanitize=safe-stack -I/usr/local/include -pthread -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -fsanitize=safe-stack -Wl,-rpath -Wl,/usr/local/lib -fstack-protector-all -Wl,-R/usr/local/lib -o basic_nis_auth basic_nis_auth.o nis_support.o -L/usr/local/lib ../../../../lib/.libs/libmiscencoding.a ../../../../compat/.libs/libcompatsquid.a -lpcreposix -lpcre -lcrypt -pthread ld: error: undefined symbol: yp_match

referenced by nis_support.cc nis_support.o:(get_nis_password(char, char, char*)) c++: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1

Stop. make[6]: stopped in /usr/ports/www/squid/work/squid-4.13/src/auth/basic/NIS *** Error code 1

Stop. make[5]: stopped in /usr/ports/www/squid/work/squid-4.13/src/auth/basic *** Error code 1

Stop. make[4]: stopped in /usr/ports/www/squid/work/squid-4.13/src/auth *** Error code 1

Stop. make[3]: stopped in /usr/ports/www/squid/work/squid-4.13/src *** Error code 1

Stop. make[2]: stopped in /usr/ports/www/squid/work/squid-4.13/src *** Error code 1

Stop. make[1]: stopped in /usr/ports/www/squid/work/squid-4.13 *** Error code 1

Stop. make: stopped in /usr/ports/www/squid

fichtner commented 3 years ago

I'm not seeing this error in our builds so I am unsure how to help you without spending time to figure out what is different for you. It may better be asked in https://bugs.freebsd.org/bugzilla/ when being able to reproduce under FreeBSD.

jcem commented 3 years ago

I'm not seeing this error in our builds so I am unsure how to help you without spending time to figure out what is different for you. It may better be asked in https://bugs.freebsd.org/bugzilla/ when being able to reproduce under FreeBSD.

Thanks for reply.

Thanks, have a nice day.

=== $ pkg install bash $ chsh -s /usr/local/bin/bash chsh: user information updated $ chsh -s /usr/local/bin/bash root chsh: user information updated $ vi /etc/make.conf ALLOW_UNSUPPORTED_SYSTEM=yes DEFAULT_VERSIONS+=ssl=openssl OPTIONS_UNSET+=GSSAPI_BASE OPTIONS_SET+=GSSAPI_NONE

OPTIONS_SET+=GSSAPI_MIT

OPTIONS_SET+=GSSAPI_HEIMDAL

$ export BATCH=yes $ cd /usr $ git clone https://github.com/opnsense/tools $ cd tools $ make -j8 update $ make -j8 info tools /usr/tools 20.7.4 c840b75f6 master src /usr/src 20.7.4 6e16e28f1 stable/20.7 ports /usr/ports 20.7.4 1fe0cc148 master plugins /usr/plugins 20.7.4 86ad06d1f stable/20.7 core /usr/core 20.7.4 71c1627b7 stable/20.7 $ cd /usr/ports/www/squid $ #make MAKE_JOBS_UNSAFE=yes $ make .... build errors ...

fichtner commented 3 years ago

The command to build ports is "make ports" in /usr/tools. You are trying to build against the host here and /etc/make.conf isn't complete.

jcem commented 3 years ago

The command to build ports is "make ports" in /usr/tools. You are trying to build against the host here and /etc/make.conf isn't complete.

Would you show me example(or default) for /etc/make.conf? Or do I check/read any other documentations?

I just want use default OPNsense version & change some ports(in this case squid). And It's been useful for me to understand OPNSense & it's system.

So I want to change some parts of OPNSense, not that of FreeBSD.

Thanks & have a nice day.

fichtner commented 3 years ago

Naturally, our make.conf is /usr/tools/config/20.7/make.conf -- you should read the documentation at https://github.com/opnsense/tools#detailed-build-steps-and-options

jcem commented 3 years ago

Thanks, I successfully built squid in 20.7.4