Created attachment 256123 [details] tcl.h_patch.diff During a port build, I got the error: 5 warnings generated. cc -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fstack-protector-strong -shared -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod -I/usr/include -DHAVE_CONFIG_H -I/usr/local/include/tcl8.6 -o ../../../pbkdf2.so ../pbkdf2.o -L/usr/lib -L/usr/local/lib -ltcl86 -lz -lpthread -lm -lssl -lcrypto && touch ../../../pbkdf2.so cc -fPIC -I/usr/local/include/python3.11 -I/usr/local/include/python3.11 -Wsign-compare -Wunreachable-code -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -pipe -Wall -I. -I../../.. -I../../.. -I../../../src/mod -I/usr/include -DHAVE_CONFIG_H -I/usr/local/include/tcl8.6 -DMAKING_MODS -c .././python.mod/python.c && mv -f python.o ../ In file included from .././python.mod/python.c:46: .././python.mod/pycmds.c:25:10: fatal error: 'tcl8.6/tcl.h' file not found 25 | #include <tcl8.6/tcl.h> | ^~~~~~~~~~~~~~ 1 error generated. *** Error code 1 Stop. make[2]: stopped in /usr/ports/irc/eggdrop/work/eggdrop-1.10.0/src/mod/python.mod *** Error code 1 It appears the location of tcl.h doesn't need to have the REINPLACE_CMD and it builds fine if commented out (or removed. Patch attached.)
I can build now with poudriere, latest ports tree. How did you try it build?
Created attachment 256240 [details] Build log failure
(In reply to Zsolt Udvari from comment #1) Hello, I just built straight from ports with the latest tree (just pulled again to be sure.) I've attached the build log in case you're curious. The "tcl8.6/tcl.h" header file does exist in /usr/local/include: # ls -al /usr/local/include/tcl8.6/tcl.h -rw-r--r-- 1 root wheel 94238 Dec 24 22:38 /usr/local/include/tcl8.6/tcl.h It looks like what is happening is that the ${TCL_INCLUDEDIR} variable is already set with the ${TCL_VER} (verified by running "make -V TCL_INCLUDEDIR" in irc/eggdrop directory.) So, it's looking for the "tcl.h" header file in /usr/local/include/tcl8.6/tcl8.6/ when the @${REINPLACE_CMD} is run for the ${WRKSRC}/src/mod/python.mod/pycmds.c file. Have you tried testing in Poudriere to see if it builds fine without this reinplace command? I'd be curious to know why the ${TCL_INCLUDEDIR} would be different inside and outside of Poudriere.
Port fails to compile as well as fails to find tcl.h
.././filesys.mod/filedb3.h:97:5: note: expanded from macro 'malloc_strcpy' 97 | my_free(target); \ | ^ .././filesys.mod/filedb3.h:83:5: note: expanded from macro 'my_free' 83 | nfree(ptr); \ | ^ ../../../src/mod/module.h:92:28: note: expanded from macro 'nfree' 92 | #define nfree(x) (global[1]((x),MODULE_NAME,__FILE__,__LINE__)) | ^ In file included from .././filesys.mod/filesys.c:126: .././filesys.mod/files.c:748:7: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C23 [-Wdeprecated-non-prototype] 748 | malloc_strcpy(newfn, par); | ^ .././filesys.mod/filedb3.h:94:16: note: expanded from macro 'malloc_strcpy' 94 | (target) = nrealloc((target), strlen(entry) + 1); \ | ^ ../../../src/mod/module.h:392:50: note: expanded from macro 'nrealloc' 392 | #define nrealloc(x,y) (((void *(*)())global[230])((x),(y),MODULE_NAME,__FILE__,__LINE__)) | ^ In file included from .././filesys.mod/filesys.c:126: .././filesys.mod/files.c:748:7: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C23 [-Wdeprecated-non-prototype] .././filesys.mod/filedb3.h:97:5: note: expanded from macro 'malloc_strcpy' 97 | my_free(target); \ | ^ .././filesys.mod/filedb3.h:83:5: note: expanded from macro 'my_free' 83 | nfree(ptr); \ | ^ ../../../src/mod/module.h:92:28: note: expanded from macro 'nfree' 92 | #define nfree(x) (global[1]((x),MODULE_NAME,__FILE__,__LINE__)) | ^ In file included from .././filesys.mod/filesys.c:126: .././filesys.mod/files.c:752:7: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C23 [-Wdeprecated-non-prototype] 752 | my_free(newfn); | ^ .././filesys.mod/filedb3.h:83:5: note: expanded from macro 'my_free' 83 | nfree(ptr); \ | ^ ../../../src/mod/module.h:92:28: note: expanded from macro 'nfree' 92 | #define nfree(x) (global[1]((x),MODULE_NAME,__FILE__,__LINE__)) | ^ In file included from .././filesys.mod/filesys.c:126: .././filesys.mod/files.c:753:7: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C23 [-Wdeprecated-non-prototype] 753 | my_free(newpath); | ^ .././filesys.mod/filedb3.h:83:5: note: expanded from macro 'my_free'
Adding in USE_GCC fixes all these which is the real reason why I added it in the first place.
Created attachment 256248 [details] add in gcc
Test run of ./eggdrop -v: Eggdrop v1.10.0 (C) 1997 Robey Pointer (C) 1999-2024 Eggheads Development Team Configure flags: '--with-sslinc=/usr/include' '--with-ssllib=/usr/lib' '--with-tclinc=/usr/local/include/tcl8.6/tcl.h' '--with-tcllib=/usr/local/lib/tcl8.6/libtcl86.so' '--prefix=/usr/local' '--localstatedir=/var' '--mandir=/usr/local/share/man' '--infodir=/usr/local/share/info/' '--build=amd64-portbld-freebsd14.2' 'build_alias=amd64-portbld-freebsd14.2' 'CC=gcc13' 'CFLAGS=-O2 -pipe -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc13 -fno-strict-aliasing ' 'LDFLAGS= -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc13 -L/usr/local/lib/gcc13 ' 'LIBS=' 'CPPFLAGS=' 'CPP=cpp13' Compiled with: IPv6, TLS, Threaded DNS core, handlen=32 Eggdrop successfully compiled: -rwxr-xr-x 1 root wheel 523216 Dec 29 02:25 eggdrop Modules successfully compiled: -rwxr-xr-x 1 root wheel 15000 Dec 29 02:25 assoc.so -rwxr-xr-x 1 root wheel 23384 Dec 29 02:25 blowfish.so -rwxr-xr-x 1 root wheel 149520 Dec 29 02:25 channels.so -rwxr-xr-x 1 root wheel 17840 Dec 29 02:25 compress.so -rwxr-xr-x 1 root wheel 16512 Dec 29 02:25 console.so -rwxr-xr-x 1 root wheel 15016 Dec 29 02:25 ctcp.so -rwxr-xr-x 1 root wheel 6488 Dec 29 02:25 dns.so -rwxr-xr-x 1 root wheel 112272 Dec 29 02:25 filesys.so -rwxr-xr-x 1 root wheel 15368 Dec 29 02:25 ident.so -rwxr-xr-x 1 root wheel 192744 Dec 29 02:25 irc.so -rwxr-xr-x 1 root wheel 39096 Dec 29 02:25 notes.so -rwxr-xr-x 1 root wheel 16208 Dec 29 02:25 pbkdf2.so -rwxr-xr-x 1 root wheel 33600 Dec 29 02:25 python.so -rwxr-xr-x 1 root wheel 19080 Dec 29 02:25 seen.so -rwxr-xr-x 1 root wheel 142328 Dec 29 02:25 server.so -rwxr-xr-x 1 root wheel 64584 Dec 29 02:25 share.so -rwxr-xr-x 1 root wheel 47104 Dec 29 02:25 transfer.so -rwxr-xr-x 1 root wheel 33784 Dec 29 02:25 twitch.so -rwxr-xr-x 1 root wheel 12720 Dec 29 02:25 uptime.so Now run "make install" to install your bot.
build and install fine think we can call this fixed.
Current version in tree builds fine both using ports tree (tested on 14.1-RELEASE amd64) and using Poudriere (13.4-RELEASE i386) so I guess we can close this without committing anything?
I should have specified that I'm using 14.2-RELEASE, but it doesn't appear to make a difference. Per Chris Petrik's patch, applying the "USE_GCC= yes" patch does fix the issue with building from the ports tree without Poudriere. I'm completely in the dark as to how it builds within Poudriere without GCC and I'm not sure why outside of Poudriere would require GCC which is another quite large build dependency that appears to be unneeded to run irc/eggdrop without just removing the additional @${REINPLACE_CMD} for the ${WRKSRC}/src/mod/python.mod/pycmds.c file? It's pretty confusing for me at the moment. But, I can confirm that the the USE_GCC patch does work. Just not sure why it's needed for the build outside of Poudriere. As far as I can tell, simply removing the placement of the TCL_VER for the tcl.h file works just fine. Thanks for the quick responses, everyone!
Because in the Linux world most if not all Distros use gcc and most develoeprs will use what ever is available. and it's easier for me to just use GCC than to hack the port to make it work with clang having to do it again after every release. I call this the "Linux Syndrome" Now saying that it would make sense to me to just add in USE_GCC since most people can pkg install gcc and not compile it. now knowing after committing for 900+ PR in my 30 years of using FreeBSD a lot of times none of this makes any sense to what the end result does. now if you want to waste time to get it to work like tijl did with Hiawatha and mbedtls 2.x which is a hack of the original software then go ahead.
(In reply to Daniel Engberg from comment #10) it fails to build for me as well as this other user so there is a problem with the current port.
Also you aren't using the current version which is 14.2 and I am using 14.2 please upgrade your system then decide that there isnat any issues.
(In reply to Chris Petrik from comment #12) Well, dang. I completely understand the frustration of the "Linux Syndrome" and I can also relate. 'Tis a shame! I suppose my main concern or question is, why does it build from the ports tree perfectly fine when simply removing the @${REINPLACE_CMD} for the tcl.h file (no USE_GCC=yes needed) but it fails to build in Poudriere without that replacement and vice-versa? I took a quick look through my /etc/make.conf file and see nothing that should change anything regarding a simple build of irc/eggdrop, but that certainly doesn't mean anything when it comes to this, apparently. I mix ports and packages all the time for large builds that aren't actually needed downstream from this build server (like GCC, LLVM, RUST, etc...) so I'm fine with keeping GCC updated via pkg only. I'm really just trying to understand why I can build and run eggdrop just fine without GCC if the port finds the tcl.h header file successfully (I hope I'm making sense? Maybe I'm missing something?) Again, I really appreciate everyone's very responsive effort on this. Cheers!
Well you mix and match ports which is a problem and the commiter doesn't use the recent version of FreeBSD so not sure how to fix this as if no one here is using recent versions of the OS and not even current like ports commiters should be using any ways.
i got poudriere setup and ill test and remove that reinplace
As of now it build fine in poudriere but fails manually make
I don't see how mixing and matching ports and packages is a problem for only a few large packages that aren't actually runtime dependencies. Otherwise, it's all ports. I just can't justify building for 6+ hours for a simple update when I "pkg upgrade" a few things and build for 20-30 minutes. I've been trying to figure out the best way to do this with Poudriere, but thus far no luck (when a new port version is available for said large build but not a package.) I'll keep poking at it, though. My next step was thinking the same thing and just spinning up a 14.2-R Poudriere jail to test it. It seems you beat me to it. Thanks!
Created attachment 256250 [details] Remove Reinplace works in poudriere and fails manually.
(In reply to ek from comment #19) Pkg's compile with the default options set if you install a port and change those options pkg will reinstall those causing what we call dep hell
(In reply to Chris Petrik from comment #20) Hrm. Are you saying that testing with Poudriere, with and without the @${REINPLACE_CMD} for tcl.h, both build successfully? And a manually build with and without the same tcl.h file adjustment fail? I haven't tested with Poudriere (yet), but with the @${REINPLACEMENT_CMD} for tcl.h, it failed manually. Without it, it seems to build fine.
(In reply to Chris Petrik from comment #21) Yes. 100% agree. If I only need default values, I use packages (which I upgrade first.) If I need non-default values, I use ports (which I upgrade after packages.) I've never run into any problems with this method. Again, I only use packages for the big stuff to avoid massive compilation times. I don't mix all that much.
Well removing REINPLACE fixed the issue to just remove the reinplace. with second patch.
Don't think I have ever needed to manually compile a port ever since pkg was created. ANd FreeBSD includes port flavors as well. as cool as it is to see your computer converting code into binary it gets old after 20+ years.
(In reply to Chris Petrik from comment #25) Well, on most of my servers, I need non-default options. I'm waiting for a lot of ports to provide SQL flavors and such (that would help immensely!) But, for now, it appears there is no way to avoid building my own ports as many non-default options are needed for certain things (especially mail servers.) They are coming along, though!
(In reply to ek from comment #26) I run my own mail servers but I do the nostalgic way of logging in and typing in mail this saves a lot of extra packages. spf, DMARC and DNSBL is pretty much email setup and it works fine for me I don't like to use SQL never did basically I don't like to install crap I don't need. Now in the modern world this doesn't work but when you have your own server and your own /29 and have control over everything well you can do things how you see fit.
(In reply to Chris Petrik from comment #27) If they were my own personal mail servers, sure. I'd absolutely do the same. But, these are massive virtual domain/user setups that require more than simple local accounts and whatnot. Obviously, these last few conversations have been more than off-topic, so let's jump back and keep this irc/eggdrop related if we can. :) However, I'd be more than happy to converse about these off-topic things in more detail outside of this PR if you'd like. I'm always happy to convey and learn more info at any time!
Never cared much for the topic thing oh lets join a channel for each word I want to say and then lets sub categorize those even more. but you can pick my brain on effnet in #FeeBSDHelp channel is 99.8% dead
Upstream PR https://github.com/eggheads/eggdrop/pull/1749 should fix the bug. Can you please give it a try and confirm? (Until it is fixed upstream, deleting line #include <tcl.h> from src/mod/python.mod/pycmds.c should be enough)
Created attachment 257081 [details] eggdrop tcl.h location fix Has no one tested this patch? I'm not sure if this is an upstream issue. It seems to just be a tcl.h location Makefile issues? If this is wrong, I apologize, but it certainly seems to work just fine for me.
Created attachment 257091 [details] Build log Build log after patch attached.
Comment on attachment 257081 [details] eggdrop tcl.h location fix Approved
Created attachment 257093 [details] patch file this patch removes line 25 from pycmds.c and fixes the issue as per Micheals link to github.
Created attachment 257096 [details] patch with rev patch file with rev bump
Thanks
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=4ca613c4414b2dfaa9de5336b6da5a74aa73f5d4 commit 4ca613c4414b2dfaa9de5336b6da5a74aa73f5d4 Author: Ryan Steinmetz <zi@FreeBSD.org> AuthorDate: 2025-01-29 18:12:14 +0000 Commit: Ryan Steinmetz <zi@FreeBSD.org> CommitDate: 2025-01-29 18:12:14 +0000 irc/eggdrop: Fix build, bump PORTREVISION PR: 283584 Reported by: ek@purplehat.org Approved by: maintainer (cpetrik@proton.me) irc/eggdrop/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=ad07ec0635d74621800d9e69ca4e9b388906a9d0 commit ad07ec0635d74621800d9e69ca4e9b388906a9d0 Author: Ryan Steinmetz <zi@FreeBSD.org> AuthorDate: 2025-02-04 16:04:41 +0000 Commit: Ryan Steinmetz <zi@FreeBSD.org> CommitDate: 2025-02-04 16:05:31 +0000 irc/eggdrop: Replace SED use with REINPLACE_CMD+patch PR: 283584 Reported by: danfe@ irc/eggdrop/Makefile | 3 +-- irc/eggdrop/files/patch-src_mod_python.mod_pycmds.c (new) | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-)