Project

General

Profile

Actions

Bug #3334

closed

ports-mgmt/dialog4ports fails linking

Added by arcade@b1t.name about 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
DPorts
Target version:
Start date:
12/14/2022
Due date:
% Done:

0%

Estimated time:

Description

When trying to build I get:

===> Applying ports patches for dialog4ports-0.1.6_1 from /usr/dports/ports-mgmt/dialog4ports/files
/usr/bin/sed i.bak -e "s@-lncurses@-rpath /lib/priv -L/usr/lib/priv -lprivate_ncursesw@g" /usr/obj/dports/ports
-mgmt/dialog4ports/dialog4ports-0.1.6/Makefile
===> Configuring for dialog4ports-0.1.6_1
===> Building for dialog4ports-0.1.6_1
--
dialog4ports.o ---
--- mixedlist.o ---
--- dialog4ports.1.gz ---
--- dialog4ports.o ---
cc pipe -I/usr/include/priv/ncurses -O2 -fno-strict-aliasing -Wall -pedantic -c dialog4ports.c
--
mixedlist.o ---
cc pipe -I/usr/include/priv/ncurses -O2 -fno-strict-aliasing -Wall -pedantic -c mixedlist.c
--
dialog4ports.1.gz ---
gzip cn dialog4ports.1 > dialog4ports.1.gz
--
mixedlist.o ---
mixedlist.c: In function 'dlg_mixedlist':
mixedlist.c:344:7: warning: implicit declaration of function 'MAX' [-Wimplicit-function-declaration]
MAX);
^~
mixedlist.c:395:15: warning: implicit declaration of function 'MIN' [-Wimplicit-function-declaration]
max_choice = MIN;
^
~
--- dialog4ports ---
cc -pipe -I/usr/include/priv/ncurses -O2 -fno-strict-aliasing -Wall -pedantic dialog4ports.o mixedlist.o -o dialog4ports -rpath /lib/priv -L/usr/lib/priv -lprivate_ncursesw -lm -ldialog
mixedlist.o:mixedlist.c:function dlg_mixedlist: error: undefined reference to 'MAX'
mixedlist.o:mixedlist.c:function dlg_mixedlist: error: undefined reference to 'MIN'
mixedlist.o:mixedlist.c:function dlg_mixedlist: error: undefined reference to 'MAX'
mixedlist.o:mixedlist.c:function dlg_mixedlist: error: undefined reference to 'MAX'
mixedlist.o:mixedlist.c:function dlg_mixedlist: error: undefined reference to 'MIN'
mixedlist.o:mixedlist.c:function dlg_mixedlist: error: undefined reference to 'MIN'
collect2: error: ld returned 1 exit status
  • [dialog4ports] Error code 1
  1. uname -a
    DragonFly probe2 6.3-DEVELOPMENT DragonFly v6.3.0.373.g81a8d1-DEVELOPMENT #1: Tue Dec 6 11:07:13 EET 2022 arcade@probe2:/usr/obj/usr/src/sys/DMIN x86_64
Actions #1

Updated by daftaupe almost 2 years ago

Hello,

our dialog.h is lacking the definition of MIN and MAX functions in comparison to FreeBSD's.

For now you can easily bypass this by adding a dragonfly patch such as :

/usr/dports/ports-mgmt/dialog4ports/dragonfly % cat patch-mixedlist.h
--- mixedlist.h.orig    2023-01-04 08:47:25.379362000 +0100
+++ mixedlist.h    2023-01-04 08:47:18.289261000 +0100
@@ -5,6 +5,14 @@
 #define CTRL_R                18
 #define F1                    265

+#if defined (__DragonFly__)
+#undef  MIN
+#define MIN(x,y) ((x) < (y) ? (x) : (y))
+
+#undef  MAX
+#define MAX(x,y) ((x) > (y) ? (x) : (y))
+#endif
+
 /* Include all borders, buttons spaces etc.. in dialog window */
 #define MAGIC_BORDER        6

That's building fine after that for me.

Actions #2

Updated by daftaupe almost 2 years ago

I've opened the following https://github.com/DragonFlyBSD/DeltaPorts/pull/1324 to get this into DPorts 2022Q4 soon.

Actions #3

Updated by daftaupe almost 2 years ago

  • Status changed from New to Resolved
  • Assignee set to daftaupe
Actions #4

Updated by daftaupe almost 2 years ago

09:56 <kworr> Morning! Yes, dialog4ports is working fine now. Thank you!

It has been reported as working.

Actions #5

Updated by daftaupe almost 2 years ago

  • Status changed from Resolved to Closed

https://github.com/DragonFlyBSD/DeltaPorts/pull/1324 has been opened, the fix will arrive in the build of 2022Q4.

Closing.

Actions

Also available in: Atom PDF