Created attachment 157692 [details] Patchset for devel/avr-gdb The avr-gdb package enables python support if it finds a python binary at configure time. This means an avr-gdb package built on a system with python will not run on a system that doesn't have python. Make the dependency on python explicit by adding an option for it.
Created attachment 157693 [details] poudriere build log
Created attachment 157694 [details] poudriere build log (9.3-RELEASE)
Created attachment 157695 [details] poudriere build log (10.1-RELEASE)
I was in the process of filing a new PR to fix this problem when I noticed that I already did so back in June. Attached is an updated patch: - Make the dependency on python explicit by adding an option for it - Fix some portlint complaints
Created attachment 164440 [details] patch
Created attachment 164441 [details] poudriere build log (10.1-RELEASE)
Created attachment 174894 [details] revised patch This is still an issue. Here's an updated patch that uses newer OPTIONS features. It also quiets some portlint complaints and eliminates pkg-plist (which should be removed).
Created attachment 174895 [details] poudriere build log (10.3-RELEASE)
Created attachment 188573 [details] revised patch Here's the latest version of the patch: - Add LICENSE - Convert pkg-plist to use PLIST_FILES - Add PYTHON option to add USES=python:2.7 Note that my testing shows that gdb 7.3.1 does not build with python 3. It might be better to default to PYTHON off since I believe that's what you get if you use poudriere to build the current devel/avr-gdb port (since python is not installed in this case and thus not auto-detected).
Created attachment 188574 [details] poudriere build log (10.3-RELEASE)
Maintainer feedback, please!
Here's some more info. If I use poudriere to build/install avr-gdb (note -i) avr-gdb works normally: # poudriere testport -i -j 10lbl -p current-patched devel/avr-gdb @ avr-gdb --version GNU gdb (GDB) 7.3.1 [...] While in the same poudriere jail: install python, uninstall avr-gdb, remove the work directory and rebuild/reinstall avr-gdb. Then uninstall python and avr-gdb fails to run: @ rm -rf /wrkdirs/usr/ports/devel/avr-gdb/work @ pkg delete -fy avr-gdb @ pkg install python27 python @ cd /usr/ports/devel/avr-gdb && make install @ pkg delete -fy python27 python @ avr-gdb --version Shared object "libpython2.7.so.1" not found, required by "avr-gdb"
I got another error: ibgdb.a(charset.o): In function `convert_between_encodings': charset.c:(.text+0x2b8): undefined reference to `libiconv_open' charset.c:(.text+0x360): undefined reference to `libiconv' libgdb.a(charset.o): In function `cleanup_iconv': charset.c:(.text+0x4f9): undefined reference to `libiconv_close' libgdb.a(charset.o): In function `make_wchar_iterator': charset.c:(.text+0x520): undefined reference to `libiconv_open' libgdb.a(charset.o): In function `do_cleanup_iterator': charset.c:(.text+0x5ad): undefined reference to `libiconv_close' libgdb.a(charset.o): In function `wchar_iterate': charset.c:(.text+0x64a): undefined reference to `libiconv' libgdb.a(charset.o): In function `_initialize_charset': charset.c:(.text+0x820): undefined reference to `libiconvlist' libgdb.a(charset.o): In function `validate': charset.c:(.text+0xd39): undefined reference to `libiconv_open' charset.c:(.text+0xd47): undefined reference to `libiconv_close' charset.c:(.text+0xd52): undefined libgdb.a(charset.o):r eIn fferunectnicoen ` toconvert_between_encodings '`: libiconv_open'charset.c: (.text+charset.c:0(x.text+2b80): xundd60e)f: uindnefiend reed freerfeenrceen cteo t`o libiconv_open`' solved with added USES=iconv to the Makefile.
Is this still relevant?
(In reply to Walter Schwarzenfeld from comment #14) I can no longer reproduce the issue shown in comment #12. But I think it's still worth adding a PYTHON option since there's currently no way to get python support if you want it. And the test I just ran built ok with python 3.7 (I use DEFAULT_VERSIONS=python3=3.7). Getting rid of the trivial pkg-plist seems worth doing. I'll attach a revised patch.
Created attachment 206980 [details] revised patch Revised patch tested on 11.2-RELEASE-p14: - Add a PYTHON option - Convert trivial pkg-plist to use PLIST_FILES
The patch is fine with me, approved.
Current version of gdb only supports Python 2.7 which is deprecated. gdb needs to be bumped in order for this option or support needs to be backported.