[bug #55526] FTBFS on GNU/kFreeBSD: NSWorkspace.m:1252:27: error: 'MOUNTED_PATH' undeclared

2019-02-10 Thread Fred Kiefer
Update of bug #55526 (project gnustep):

  Status:  Ready For Test => Fixed  
 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/


___
Bug-gnustep mailing list
Bug-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-gnustep


[bug #55526] FTBFS on GNU/kFreeBSD: NSWorkspace.m:1252:27: error: 'MOUNTED_PATH' undeclared

2019-02-03 Thread Yavor Doganov
Follow-up Comment #5, bug #55526 (project gnustep):

Riccardo, it builds successfully, feel free to close this bug.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/


___
Bug-gnustep mailing list
Bug-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-gnustep


[bug #55526] FTBFS on GNU/kFreeBSD: NSWorkspace.m:1252:27: error: 'MOUNTED_PATH' undeclared

2019-01-21 Thread Yavor Doganov
Follow-up Comment #4, bug #55526 (project gnustep):

Thanks; I won't be able to build-test it until the next gnustep-gui upload to
Debian.

GNU/kFreeBSD is more closer to GNU/Linux than to FreeBSD, because the
underlying C library (glibc) is the same.  This is basically a GNU system but
running with another kernel.  Part of the confusion comes because people talk
about Linux as an OS when in fact it's just a kernel.

For programming purposes, you can (and should) treat GNU/kFreeBSD as a glibc
platform -- you are already using the portable macros as documented in the
glibc manual (albeit confusingly redefined to the deprecated ones) so that
should be sufficient.

The conditionals in -mountedLocalVolumePaths are of no concern since the
HAVE_GETMNTINFO branch will be compiled on GNU/kFreeBSD, which is fine.  It is
also fine to compile the other branch (HAVE_GETMNTENT) and you can enforce it
on GNU/kFreeBSD if you wish so with the appropriate defines.

But the result should be the same.  When Bruno Haibble ported the GNU C
Library to the FreeBSD kernel (hats off to this hacker!), he implemented
interfaces which were not feasible with the Linux kernel but were expected and
customary with a FreeBSD kernel, like getmntinfo.

So there it is, a hybrid system which proves the defines were wrong as it is
perfectly possible to have both.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/


___
Bug-gnustep mailing list
Bug-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-gnustep


[bug #55526] FTBFS on GNU/kFreeBSD: NSWorkspace.m:1252:27: error: 'MOUNTED_PATH' undeclared

2019-01-21 Thread Riccardo Mottola
Update of bug #55526 (project gnustep):

  Status:None => Ready For Test 

___

Follow-up Comment #3:

I commited an equivalent patch, you can try it. It has no adverse effects on
Linux where I tried. It will fix your "compile from source"

The issue might be in 
mountedLocalVolumePaths  though

However I don't know if on kFreeBSD it is more Linux like or not. Should i use
the getmintinfo code path or getmntent? 

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/


___
Bug-gnustep mailing list
Bug-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-gnustep


[bug #55526] FTBFS on GNU/kFreeBSD: NSWorkspace.m:1252:27: error: 'MOUNTED_PATH' undeclared

2019-01-20 Thread Yavor Doganov
Follow-up Comment #2, bug #55526 (project gnustep):

Yes, the code which triggers this is new (your changes) which is why we got
away with it until now.  I don't see anything unsafe with the patch; this code
will work on GNU/kFreeBSD in the same way as on GNU/Linux.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/


___
Bug-gnustep mailing list
Bug-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-gnustep


[bug #55526] FTBFS on GNU/kFreeBSD: NSWorkspace.m:1252:27: error: 'MOUNTED_PATH' undeclared

2019-01-20 Thread Riccardo Mottola
Update of bug #55526 (project gnustep):

 Assigned to:None => rmottola   

___

Follow-up Comment #1:

I will try looking into this.
The includes you are changing are the same since 8 years!
However, the code which uses them is now new.

Your patch might make the code compile, but I think it will not function or
not function optimally.

I have no means of testing the result however.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/


___
Bug-gnustep mailing list
Bug-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-gnustep


[bug #55526] FTBFS on GNU/kFreeBSD: NSWorkspace.m:1252:27: error: 'MOUNTED_PATH' undeclared

2019-01-20 Thread Yavor Doganov
URL:
  

 Summary: FTBFS on GNU/kFreeBSD: NSWorkspace.m:1252:27: error:
'MOUNTED_PATH' undeclared
 Project: GNUstep
Submitted by: yavor
Submitted on: Sun 20 Jan 2019 06:57:10 PM EET
Category: Gui/AppKit
Severity: 3 - Normal
  Item Group: Bug
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any

___

Details:

GUI 0.27.0 fails to build on GNU/kFreeBSD with:


gcc NSWorkspace.m -c \
  -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -DGNUSTEP_TARGET_DIR=\".\"
-DGNUSTEP_TARGET_CPU=\"x86_64\" -DGNUSTEP_TARGET_OS=\"kfreebsd-gnu\"
-DLIBRARY_COMBO=\"gnu-gnu-gnu\" -DGNUSTEP_BASE_HAVE_LIBXML=1
-DBACKEND_BUNDLE=1 -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1
-DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing -fexceptions
-fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -pthread -fPIC -fPIC -Wall
-DGSWARN -DGSDIAGNOSE -Wno-import -g -O2 -g -O2
-fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat
-Werror=format-security -fgnu-runtime -Wall
-fconstant-string-class=NSConstantString -I../Headers/Additions -I../Headers
-I./. -I. -I/usr/local/include/GNUstep -I/usr/include/GNUstep -Wdate-time
-D_FORTIFY_SOURCE=2 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0
-DMAGICKCORE_QUANTUM_DEPTH=16
-I/usr/include/x86_64-kfreebsd-gnu//ImageMagick-6 -I/usr/include/ImageMagick-6
-I/usr/include/libpng16 \
   -o obj/libgnustep-gui.obj/NSWorkspace.m.o
NSWorkspace.m:71:4: warning: #warning "Mounted path file for you OS guessed to
/etc/mtab"; [-Wcpp]
 #  warning "Mounted path file for you OS guessed to /etc/mtab";
^~~
NSWorkspace.m: In function '-[NSWorkspace
getFileSystemInfoForPath:isRemovable:isWritable:isUnmountable:description:type:]':
NSWorkspace.m:1252:17: warning: implicit declaration of function 'setmntent';
did you mean 'getmntinfo'? [-Wimplicit-function-declaration]
   FILE  *fptr = setmntent(MOUNTED_PATH, "r");
 ^
 getmntinfo
NSWorkspace.m:1252:27: error: 'MOUNTED_PATH' undeclared (first use in this
function); did you mean 'AUDIT_PATH'?
   FILE  *fptr = setmntent(MOUNTED_PATH, "r");
   ^~~~
   AUDIT_PATH
NSWorkspace.m:1252:27: note: each undeclared identifier is reported only once
for each function it appears in
NSWorkspace.m:1255:16: warning: implicit declaration of function 'getmntent';
did you mean 'getmntinfo'? [-Wimplicit-function-declaration]
   while ((me = getmntent(fptr)) != 0)
^
getmntinfo
NSWorkspace.m:1255:14: warning: assignment to 'struct mntent *' from 'int'
makes pointer from integer without a cast [-Wint-conversion]
   while ((me = getmntent(fptr)) != 0)
  ^
In file included from /usr/include/string.h:634,
 from /usr/include/x86_64-kfreebsd-gnu/sys/mount.h:38,
 from NSWorkspace.m:39:
NSWorkspace.m:1257:18: error: dereferencing pointer to incomplete type 'struct
mntent'
 if (strcmp(me->MNT_MEMB, [fullPath fileSystemRepresentation]) == 0)
  ^~
NSWorkspace.m:1262:3: warning: implicit declaration of function 'endmntent'
[-Wimplicit-function-declaration]
   endmntent(fptr);
   ^
/usr/share/GNUstep/Makefiles/rules.make:479: recipe for target
'obj/libgnustep-gui.obj/NSWorkspace.m.o' failed


GNU/kFreeBSD provides both getmntinfo and getmntent but the conditionals
assume it's either one of them (as is the case on GNU/Linux where getmntinfo
is missing).

Please consider applying the attached obvious patch which has been tested on
Debian's GNU/kFreeBSD autobuilders.  (I believe you can do it with "git am".)



___

File Attachments:


---
Date: Sun 20 Jan 2019 06:57:10 PM EET  Name:
0001-Fix-build-failure-on-GNU-kFreeBSD.patch  Size: 1KiB   By: yavor



___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/


___
Bug-gnustep mailing list
Bug-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-gnustep