Git Product home page Git Product logo

gnustep / libs-base Goto Github PK

View Code? Open in Web Editor NEW
915.0 43.0 276.0 35.16 MB

The GNUstep Base Library is a library of general-purpose, non-graphical Objective C objects.

Home Page: https://www.gnustep.org/

License: GNU General Public License v2.0

Makefile 0.29% Objective-C 55.46% C 36.53% Objective-C++ 0.04% Shell 0.01% GAP 0.02% M4 1.09% Roff 6.57%
foundation gnu base-library objective-c gnustep

libs-base's Introduction

GNUstep Base Library

CI

The GNUstep Base Library is a library of general-purpose, non-graphical Objective C objects. For example, it includes classes for strings, object collections, byte streams, typed coders, invocations, notifications, notification dispatchers, moments in time, network ports, remote object messaging support (distributed objects), and event loops.

It provides functionality that aims to implement the non-graphical portion of the Apple's Cocoa frameworks (the Foundation library) which came from the OpenStep standard.

Initial reading

The file NEWS has the library's feature history.

The files INSTALL or GNUstep-HOWTO (from the web site) gives instructions for installing the library.

License

The GNUstep libraries and library resources are covered under the GNU Lesser Public License. This means you can use these libraries in any program (even non-free programs). If you distribute the libraries along with your program, you must make the improvements you have made to the libraries freely available. You should read the COPYING.LIB file for more information. All files in the 'Source', 'Headers', 'NSCharacterSets', 'NSTimeZones', and 'Resources' directories and subdirectories under this are covered under the LGPL.

GNUstep tools, test programs, and other files are covered under the GNU Public License. This means if you make changes to these programs, you cannot charge a fee, other than distribution fees, for others to use the program. You should read the COPYING file for more information. All files in the 'Documentation', 'Examples', 'Tools', 'config', and 'macosx' directories are covered under the GPL.

With GNUstep-Base, we strongly recommend the use of the ffcall libraries, which provides stack frame handling for NSInvocation and NSConnection. "Ffcall is under GNU GPL. As a special exception, if used in GNUstep or in derivate works of GNUstep, the included parts of ffcall are under GNU LGPL" (Text in quotes provided by the author of ffcall).

How can you help?

Give us feedback! Tell us what you like; tell us what you think could be better.

Please log bug reports on the GitHub issues page.

Happy hacking!

Copyright (C) 2005 Free Software Foundation

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.

libs-base's People

Contributors

afedor avatar alexmalmberg avatar alotorev avatar artoria2e5 avatar david-ayers avatar davidchisnall avatar dwetzel72 avatar ericwa avatar fredkiefer avatar gcasa avatar hmelder avatar ivucica avatar lubosd avatar mirkoevo avatar ngrewe avatar nico-31415 avatar plaurent avatar qmfrederik avatar ratmice avatar rfm avatar rmottola avatar schristley avatar stefanbidi avatar svgol avatar theiostream avatar triplef avatar trunkmaster avatar wlux avatar woudshoo avatar znek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libs-base's Issues

build failed with ARC(clang -fobjc-arc) option

OBJCFLAGS="-fobjc-arc" ./configure --prefix=/opt/gnustep --disable-mixedabi

checking whether objc really works... no
I don't seem to be able to use your Objective-C compiler to produce
working binaries!  Please check your Objective-C compiler installation.
If you are using gcc-3.x make sure that your compiler's libgcc_s and libobjc
can be found by the dynamic linker - usually that requires you to play
with LD_LIBRARY_PATH or /etc/ld.so.conf.
Please refer to your compiler installation instructions for more help.
configure: error: The Objective-C compiler does not work or is not installed properly.

in config.log

configure:7637: checking whether objc really works
configure:7657: clang -o conftest -I/opt/gnustep/include  -I/opt/gnustep/Local/Library/Headers -I/opt/gnustep/Local/Library/Headers -I/opt/gnustep/System/Library/Headers -I/opt/gnustep/Local/Library/Headers -fobjc-arc -I/opt/gnustep/include -x objective-c -L/opt/gnustep/lib -ldispatch -L/opt/gnustep/Local/Library/Libraries -L/opt/gnustep/Local/Library/Libraries -L/opt/gnustep/System/Library/Libraries -L/opt/gnustep/Local/Library/Libraries conftest.c -lrt -ldl  -lpthread -rdynamic -L/opt/gnustep/lib -ldispatch -pthread -fexceptions -fobjc-runtime=gnustep-1.8 -fblocks -L/root/GNUstep/Library/Libraries -L/opt/gnustep/Local/Library/Libraries -L/opt/gnustep/System/Library/Libraries -lpthread -lobjc -fobjc-nonfragile-abi -lm   -lpthread  >&5
In file included from conftest.c:105:
In file included from ././config/config.objc.m:2:
././config/objc-common.g:53:19: error: implicit conversion of C pointer type 'void *' to Objective-C pointer type 'NSObject *' requires a bridged cast
  NSObject *obj = calloc(sizeof(id), 1);
                  ^~~~~~~~~~~~~~~~~~~~~
././config/objc-common.g:53:19: note: use __bridge to convert directly (no change in ownership)
  NSObject *obj = calloc(sizeof(id), 1);
                  ^
                  (__bridge NSObject *)( )
././config/objc-common.g:53:19: note: use __bridge_transfer to transfer ownership of a +1 'void *' into ARC
  NSObject *obj = calloc(sizeof(id), 1);
                  ^
                  (__bridge_transfer NSObject *)( )
././config/objc-common.g:54:3: warning: assignment to Objective-C's isa is deprecated in favor of object_setClass() [-Wdeprecated-objc-isa-usage]
  obj->isa = self;
  ^  ~~~~~~~
  object_setClass( , )
././config/objc-common.g:47:5: note: instance variable is declared here
 id isa;
    ^
././config/objc-common.g:45:31: warning: class 'NSObject' defined without specifying a base class [-Wobjc-root-class]
GS_OBJC_ROOT_CLASS @interface NSObject
                              ^
././config/objc-common.g:45:39: note: add a super class to fix this problem
GS_OBJC_ROOT_CLASS @interface NSObject
                                      ^
                                       : NSObject 
In file included from conftest.c:105:
././config/config.objc.m:4:31: warning: class 'Test' defined without specifying a base class [-Wobjc-root-class]
GS_OBJC_ROOT_CLASS @interface Test 
                              ^
././config/config.objc.m:4:35: note: add a super class to fix this problem
GS_OBJC_ROOT_CLASS @interface Test 
                                  ^
                                   : NSObject 
3 warnings and 1 error generated.
configure:7657: $? = 1
configure: program exited with status 1

how to support ARC in GNUstep base library?

NSTimer with blocks doesn’t work (but with @selector works)

Hi,

When I use NSTimer with a @selector it works fine, but when I use it with a block it doesn’t work:

  self.nstimer1 = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                  repeats:YES
                                                   block:^(NSTimer* t) {
                                                           NSLog(@"NSTimer1");
                                                         }];
  self.nstimer2 = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                   target:self
                                                 selector:@selector(timer2callback:)
                                                 userInfo:nil
                                                  repeats:YES];

    NSLog(@"NSTimer1 is %@", self.nstimer1);
    NSLog(@"NSTimer2 is %@", self.nstimer2);
}

-(void)timer2callback:(NSTimer*)timer {
    NSLog(@"NSTimer2");
}

Note that the block that should be called by NSTimer1 is not called (and, in fact, is printed out as (null)).

patryk@pinebook:~/Desktop/gnustep-code/gnustep-code/TimerBugDemo$ openapp ./TimerBugDemo.app
[...]
2020-01-18 01:24:07.250 TimerBugDemo[22133:22133] NSTimer1 is <NSTimer: 0xa254c8> at 2020-01-18 01:24:08 +0000 invokes (null)
2020-01-18 01:24:07.255 TimerBugDemo[22133:22133] NSTimer2 is <NSTimer: 0xa25538> at 2020-01-18 01:24:08 +0000 sends timer2callback: to (<AppDelegate: 0xaf86f8>Number: 4 Title: Window)
2020-01-18 01:24:08.252 TimerBugDemo[22133:22133] NSTimer2
2020-01-18 01:24:09.251 TimerBugDemo[22133:22133] NSTimer2
2020-01-18 01:24:10.251 TimerBugDemo[22133:22133] NSTimer2
2020-01-18 01:24:11.251 TimerBugDemo[22133:22133] NSTimer2
2020-01-18 01:24:12.252 TimerBugDemo[22133:22133] NSTimer2
2020-01-18 01:24:13.251 TimerBugDemo[22133:22133] NSTimer2

[NSCharacterSet invertedSet] doesn't contain all the characters it should

NSCharacterSet *everythingExceptNewlines = [[NSCharacterSet newlineCharacterSet] invertedSet];
BOOL a = [everythingExceptNewlines characterIsMember:0x0061];
BOOL ö = [everythingExceptNewlines characterIsMember:0x00f6];

a is YES
ö is NO

Both BOOLs should be YES.
(When I tested in January this worked as expected)

WSAStartup() should not be called from DllMain

Running our Windows app using GNUstep Base through Application Verifier leads to the following warning:

VERIFIER STOP 000000000000E100: pid 0x3E40: Illegal networking API called from DllMain 

	00007FFEC14203B0 : Networking function being called from DllMain
	000001F4678A3FCC : Name of Dll making invalid call if not NULL
	0000000000000000 : Not used
	0000000000000000 : Not used

This seems to be caused by WSAStartup() being called from DllMain in gnustep_base_socket_init().

The WSAStartup() documentation says:

The WSAStartup function typically leads to protocol-specific helper DLLs being loaded. As a result, the WSAStartup function should not be called from the DllMain function in a application DLL. This can potentially cause deadlocks. For more information, please see the DLL Main Function.

Given that gnustep_base_socket_init() is also called from +[NSObject initialize], do we actually need to also call it from DllMain?

NSCalendar rangeOfUnit:inUnit:forDate: not implemented

Hello, I've a different behavior of NSCalendar that makes my little App to work on OS X 10.10, 10.6.8, but not on GNUstep.

I wrote the App on 10.10, then ported on 10.6.8 to make compatible GNUstep nibs/xibs, then ported on GNUstep.

The problem seems to come from the line 59 in AppDelegate.m, when trying to calculate an NSRange:

NSRange range = [gregorian rangeOfUnit:NSDayCalendarUnit inUnit:NSMonthCalendarUnit forDate:      [gregorian dateFromComponents:components]];
monthDays = range.length;
NSLog(@"Numbers of Days %ld", monthDays);

From the NSLog I can see that monthDays is "0", insted on OS X is 28 (for february, 31 for Jan, and so on).

What I wrong?

You can look the code on github:

https://github.com/AlessandroSangiuliano/Calendar

In the OSX directory there is the OS X version of the App.

Best Regards,

Alex.

P.S: I sent this mail two times on the discuXX-gnustXX mailing list, one yesterday and one this morning, but seems my mails are no more accepted by the server for some reason.

NSFileManager _copyFile:toFile:handler should handle source file size change gracefully

An application of mine recently went into an infinite loop when it called NSFileManager's copyPath method. The problem was that the source file was modified by a different process during the copy. The NSFileManager code contains a loop up to the size of the source file (currently at line 2821), where the loop counter is incremented by the number of bytes read from the source file and the file size is computed at the start of the copy. There is a race condition here: if the file gets smaller during the copy, then read will hit EOF before the loop counter reaches the previous size, and the read will keep returning 0, resulting in an infinite loop.

I suggest that if the read operation returns 0 more than once in the loop, the method should throw an exception stating that the source file was possibly modified.

Error using __block storage type modifier due to NSXPCConnection.h undefining it

With the recent change in NSXPCConnection I am no longer able to use the __block storage type modifier on variable definitions, because the change is undefining the __block built-in.

When I remove the #ifdef/#undef in NSXPCConnection.h, I get the following output showing the original built-in definition:

NSXPCConnection.h:41:9: warning: '__block' macro redefined [-Wmacro-redefined]
#define __block __gs_unistd_block
        ^
<built-in>:66:9: note: previous definition is here
#define __block __attribute__((__blocks__(byref)))

This is using the Android toolchain with the 2.0 runtime and blocks.

Tests don't set rpath

The GNUstep Base test suite doesn't set the rpath to point to the built library. This means that you need to juggle LD_LIBRARY_PATH directives if you want to run the tests against the just-build -base, without having to install it.

Getting errors on exception handling when building with clang.

GSXML.m:4147:3: error: use of undeclared identifier 'NS_DURING'
NS_DURING
^

GSXML.m:4202:3: error: use of undeclared identifier 'NS_DURING'
NS_DURING
^
GSXML.m:4256:3: error: use of undeclared identifier 'NS_DURING'
NS_DURING
^
GSXML.m:5365:7: error: use of undeclared identifier 'NS_DURING'
NS_DURING
^
GSXML.m:5401:3: error: use of undeclared identifier 'NS_DURING'
NS_DURING
^
GSXML.m:5433:3: error: use of undeclared identifier 'NS_DURING'
NS_DURING
^
GSXML.m:5468:3: error: use of undeclared identifier 'NS_DURING'
NS_DURING
^
GSXML.m:5503:3: error: use of undeclared identifier 'NS_DURING'
NS_DURING
^
GSXML.m:5530:3: error: use of undeclared identifier 'NS_DURING'
NS_DURING
^
GSXML.m:5747:7: error: use of undeclared identifier 'NS_DURING'
NS_DURING

Error: symbol `__objc_class_ref__GSMutableInsensitiveDictionary.lto_priv.1' is already defined

Hi all.

gnustep-base-1.27.0 is not compiled in Fedora 34 because of this error:

gcc  -shared -Wl,-soname,libgnustep-base.so.1.27 -rdynamic     -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -shared-libgcc  -pthread -fexceptions -o ./obj/libgnustep-base.so.1.27.0 obj/libgnustep-base.obj/GSLocale.m.o obj/libgnustep-base.obj/preface.m.o obj/libgnustep-base.obj/cifframe.m.o obj/libgnustep-base.obj/CXXException.m.o obj/libgnustep-base.obj/GSArray.m.o obj/libgnustep-base.obj/GSAttributedString.m.o obj/libgnustep-base.obj/GSBlocks.m.o obj/libgnustep-base.obj/GSConcreteValue.m.o obj/libgnustep-base.obj/GSCountedSet.m.o obj/libgnustep-base.obj/GSDictionary.m.o obj/libgnustep-base.obj/GSFTPURLHandle.m.o obj/libgnustep-base.obj/GSFormat.m.o obj/libgnustep-base.obj/GSHTTPAuthentication.m.o obj/libgnustep-base.obj/GSHTTPURLHandle.m.o obj/libgnustep-base.obj/GSICUString.m.o obj/libgnustep-base.obj/GSOrderedSet.m.o obj/libgnustep-base.obj/GSPrivateHash.m.o obj/libgnustep-base.obj/GSQuickSort.m.o obj/libgnustep-base.obj/GSRunLoopWatcher.m.o obj/libgnustep-base.obj/GSSet.m.o obj/libgnustep-base.obj/GSShellSort.m.o obj/libgnustep-base.obj/GSSocketStream.m.o obj/libgnustep-base.obj/GSStream.m.o obj/libgnustep-base.obj/GSString.m.o obj/libgnustep-base.obj/GSTimSort.m.o obj/libgnustep-base.obj/GSTLS.m.o obj/libgnustep-base.obj/GSValue.m.o obj/libgnustep-base.obj/GSSocksParser/GSSocksParser.m.o obj/libgnustep-base.obj/GSSocksParser/GSSocksParserPrivate.m.o obj/libgnustep-base.obj/GSSocksParser/GSSocks4Parser.m.o obj/libgnustep-base.obj/GSSocksParser/GSSocks5Parser.m.o obj/libgnustep-base.obj/NSAffineTransform.m.o obj/libgnustep-base.obj/NSAppleEventDescriptor.m.o obj/libgnustep-base.obj/NSAppleEventManager.m.o obj/libgnustep-base.obj/NSAppleScript.m.o obj/libgnustep-base.obj/NSArchiver.m.o obj/libgnustep-base.obj/NSArray.m.o obj/libgnustep-base.obj/NSAssertionHandler.m.o obj/libgnustep-base.obj/NSAttributedString.m.o obj/libgnustep-base.obj/NSAutoreleasePool.m.o obj/libgnustep-base.obj/NSBackgroundActivityScheduler.m.o obj/libgnustep-base.obj/NSBundle.m.o obj/libgnustep-base.obj/NSByteCountFormatter.m.o obj/libgnustep-base.obj/NSCache.m.o obj/libgnustep-base.obj/NSCachedURLResponse.m.o obj/libgnustep-base.obj/NSCalendar.m.o obj/libgnustep-base.obj/NSCalendarDate.m.o obj/libgnustep-base.obj/NSCallBacks.m.o obj/libgnustep-base.obj/NSCharacterSet.m.o obj/libgnustep-base.obj/NSClassDescription.m.o obj/libgnustep-base.obj/NSCoder.m.o obj/libgnustep-base.obj/NSCopyObject.m.o obj/libgnustep-base.obj/NSCountedSet.m.o obj/libgnustep-base.obj/NSConcreteHashTable.m.o obj/libgnustep-base.obj/NSConcreteMapTable.m.o obj/libgnustep-base.obj/NSConnection.m.o obj/libgnustep-base.obj/NSData.m.o obj/libgnustep-base.obj/NSDate.m.o obj/libgnustep-base.obj/NSDateComponentsFormatter.m.o obj/libgnustep-base.obj/NSDateFormatter.m.o obj/libgnustep-base.obj/NSDateInterval.m.o obj/libgnustep-base.obj/NSDateIntervalFormatter.m.o obj/libgnustep-base.obj/NSDebug.m.o obj/libgnustep-base.obj/NSDecimal.m.o obj/libgnustep-base.obj/NSDecimalNumber.m.o obj/libgnustep-base.obj/NSDictionary.m.o obj/libgnustep-base.obj/NSDistantObject.m.o obj/libgnustep-base.obj/NSDistributedLock.m.o obj/libgnustep-base.obj/NSDistributedNotificationCenter.m.o obj/libgnustep-base.obj/NSEnergyFormatter.m.o obj/libgnustep-base.obj/NSEnumerator.m.o obj/libgnustep-base.obj/NSError.m.o obj/libgnustep-base.obj/NSException.m.o obj/libgnustep-base.obj/NSExtensionContext.m.o obj/libgnustep-base.obj/NSExtensionItem.m.o obj/libgnustep-base.obj/NSFileCoordinator.m.o obj/libgnustep-base.obj/NSFileHandle.m.o obj/libgnustep-base.obj/NSFileManager.m.o obj/libgnustep-base.obj/NSFileVersion.m.o obj/libgnustep-base.obj/NSFileWrapper.m.o obj/libgnustep-base.obj/NSFormatter.m.o obj/libgnustep-base.obj/NSGarbageCollector.m.o obj/libgnustep-base.obj/NSGeometry.m.o obj/libgnustep-base.obj/NSHashTable.m.o obj/libgnustep-base.obj/NSHFSFileTypes.m.o obj/libgnustep-base.obj/NSHost.m.o obj/libgnustep-base.obj/NSHTTPCookie.m.o obj/libgnustep-base.obj/NSHTTPCookieStorage.m.o obj/libgnustep-base.obj/NSIndexPath.m.o obj/libgnustep-base.obj/NSIndexSet.m.o obj/libgnustep-base.obj/NSInvocation.m.o obj/libgnustep-base.obj/NSInvocationOperation.m.o obj/libgnustep-base.obj/NSISO8601DateFormatter.m.o obj/libgnustep-base.obj/NSItemProvider.m.o obj/libgnustep-base.obj/NSItemProviderReadingWriting.m.o obj/libgnustep-base.obj/NSJSONSerialization.m.o obj/libgnustep-base.obj/NSKeyedArchiver.m.o obj/libgnustep-base.obj/NSKeyedUnarchiver.m.o obj/libgnustep-base.obj/NSKeyValueCoding.m.o obj/libgnustep-base.obj/NSKeyValueObserving.m.o obj/libgnustep-base.obj/NSLengthFormatter.m.o obj/libgnustep-base.obj/NSLinguisticTagger.m.o obj/libgnustep-base.obj/NSLocale.m.o obj/libgnustep-base.obj/NSLock.m.o obj/libgnustep-base.obj/NSLog.m.o obj/libgnustep-base.obj/NSMapTable.m.o obj/libgnustep-base.obj/NSMassFormatter.m.o obj/libgnustep-base.obj/NSMeasurementFormatter.m.o obj/libgnustep-base.obj/NSMeasurement.m.o obj/libgnustep-base.obj/NSMetadata.m.o obj/libgnustep-base.obj/NSMetadataAttributes.m.o obj/libgnustep-base.obj/NSMethodSignature.m.o obj/libgnustep-base.obj/NSNotification.m.o obj/libgnustep-base.obj/NSNotificationCenter.m.o obj/libgnustep-base.obj/NSNotificationQueue.m.o obj/libgnustep-base.obj/NSNull.m.o obj/libgnustep-base.obj/NSNumber.m.o obj/libgnustep-base.obj/NSNumberFormatter.m.o obj/libgnustep-base.obj/NSObjCRuntime.m.o obj/libgnustep-base.obj/NSObject.m.o obj/libgnustep-base.obj/NSObjectScripting.m.o obj/libgnustep-base.obj/NSObject+NSComparisonMethods.m.o obj/libgnustep-base.obj/NSOperation.m.o obj/libgnustep-base.obj/NSOrderedSet.m.o obj/libgnustep-base.obj/NSOrthography.m.o obj/libgnustep-base.obj/NSPage.m.o obj/libgnustep-base.obj/NSPathUtilities.m.o obj/libgnustep-base.obj/NSPersonNameComponents.m.o obj/libgnustep-base.obj/NSPersonNameComponentsFormatter.m.o obj/libgnustep-base.obj/NSPipe.m.o obj/libgnustep-base.obj/NSPointerArray.m.o obj/libgnustep-base.obj/NSPointerFunctions.m.o obj/libgnustep-base.obj/NSConcretePointerFunctions.m.o obj/libgnustep-base.obj/NSPort.m.o obj/libgnustep-base.obj/NSPortCoder.m.o obj/libgnustep-base.obj/NSPortMessage.m.o obj/libgnustep-base.obj/NSPortNameServer.m.o obj/libgnustep-base.obj/NSPredicate.m.o obj/libgnustep-base.obj/NSProcessInfo.m.o obj/libgnustep-base.obj/NSProgress.m.o obj/libgnustep-base.obj/NSPropertyList.m.o obj/libgnustep-base.obj/NSProtocolChecker.m.o obj/libgnustep-base.obj/NSProxy.m.o obj/libgnustep-base.obj/NSRange.m.o obj/libgnustep-base.obj/NSRegularExpression.m.o obj/libgnustep-base.obj/NSRunLoop.m.o obj/libgnustep-base.obj/NSScanner.m.o obj/libgnustep-base.obj/NSScriptClassDescription.m.o obj/libgnustep-base.obj/NSScriptCoercionHandler.m.o obj/libgnustep-base.obj/NSScriptCommand.m.o obj/libgnustep-base.obj/NSScriptCommandDescription.m.o obj/libgnustep-base.obj/NSScriptExecutionContext.m.o obj/libgnustep-base.obj/NSScriptKeyValueCoding.m.o obj/libgnustep-base.obj/NSScriptObjectSpecifiers.m.o obj/libgnustep-base.obj/NSScriptStandardSuiteCommands.m.o obj/libgnustep-base.obj/NSScriptSuiteRegistry.m.o obj/libgnustep-base.obj/NSUnit.m.o obj/libgnustep-base.obj/NSUserActivity.m.o obj/libgnustep-base.obj/NSUserScriptTask.m.o obj/libgnustep-base.obj/NSSerializer.m.o obj/libgnustep-base.obj/NSSet.m.o obj/libgnustep-base.obj/NSSocketPort.m.o obj/libgnustep-base.obj/NSSocketPortNameServer.m.o obj/libgnustep-base.obj/NSSortDescriptor.m.o obj/libgnustep-base.obj/NSSpellServer.m.o obj/libgnustep-base.obj/NSString.m.o obj/libgnustep-base.obj/NSTask.m.o obj/libgnustep-base.obj/NSThread.m.o obj/libgnustep-base.obj/NSTimer.m.o obj/libgnustep-base.obj/NSTimeZone.m.o obj/libgnustep-base.obj/NSUbiquitousKeyValueStore.m.o obj/libgnustep-base.obj/NSUnarchiver.m.o obj/libgnustep-base.obj/NSUndoManager.m.o obj/libgnustep-base.obj/NSURL.m.o obj/libgnustep-base.obj/NSURLSession.m.o obj/libgnustep-base.obj/NSURLAuthenticationChallenge.m.o obj/libgnustep-base.obj/NSURLCache.m.o obj/libgnustep-base.obj/NSURLCredential.m.o obj/libgnustep-base.obj/NSURLConnection.m.o obj/libgnustep-base.obj/NSURLCredentialStorage.m.o obj/libgnustep-base.obj/NSURLDownload.m.o obj/libgnustep-base.obj/NSURLProtectionSpace.m.o obj/libgnustep-base.obj/NSURLProtocol.m.o obj/libgnustep-base.obj/NSURLRequest.m.o obj/libgnustep-base.obj/NSURLResponse.m.o obj/libgnustep-base.obj/NSTextCheckingResult.m.o obj/libgnustep-base.obj/NSURLHandle.m.o obj/libgnustep-base.obj/NSUserDefaults.m.o obj/libgnustep-base.obj/NSUserNotification.m.o obj/libgnustep-base.obj/NSUUID.m.o obj/libgnustep-base.obj/NSValue.m.o obj/libgnustep-base.obj/NSValueTransformer.m.o obj/libgnustep-base.obj/NSXMLDocument.m.o obj/libgnustep-base.obj/NSXMLDTD.m.o obj/libgnustep-base.obj/NSXMLDTDNode.m.o obj/libgnustep-base.obj/NSXMLElement.m.o obj/libgnustep-base.obj/NSXMLNode.m.o obj/libgnustep-base.obj/NSXMLParser.m.o obj/libgnustep-base.obj/NSXPCConnection.m.o obj/libgnustep-base.obj/NSZone.m.o obj/libgnustep-base.obj/externs.m.o obj/libgnustep-base.obj/objc-load.m.o obj/libgnustep-base.obj/GSFileHandle.m.o obj/libgnustep-base.obj/NSMessagePort.m.o obj/libgnustep-base.obj/NSMessagePortNameServer.m.o obj/libgnustep-base.obj/NSNetServices.m.o obj/libgnustep-base.obj/GSAvahiNetService.m.o obj/libgnustep-base.obj/GSAvahiNetServiceBrowser.m.o obj/libgnustep-base.obj/GSAvahiClient.m.o obj/libgnustep-base.obj/GSAvahiRunLoopIntegration.m.o obj/libgnustep-base.obj/GSFFIInvocation.m.o ObjectiveC2/obj/subproject.o Additions/obj/subproject.o unix/obj/subproject.o   -L./obj    -L/builddir/GNUstep/Library/Libraries -L/usr/local/lib64 -L/usr/lib64  -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  -Wl,--as-needed -L/usr/local/lib64 -L/usr/local/lib64 -L/usr/lib64  -lobjc -lgmp -lavahi-common -lavahi-client -lgnutls  -lxslt -lxml2  -lffi  -lrt -ldl  -lpthread -lz -licui18n -licuuc -licudata  -lm  && (cd ./obj; rm -f libgnustep-base.so; if [ "libgnustep-base.so.1.27" != "libgnustep-base.so.1.27.0" ]; then rm -f libgnustep-base.so.1.27; ln -s libgnustep-base.so.1.27.0 libgnustep-base.so.1.27; fi; ln -s libgnustep-base.so.1.27 libgnustep-base.so; )
In function 'strncpy',
    inlined from 'ValueForKey' at NSKeyValueCoding.m:167:7,
    inlined from '_i_NSObject_KeyValueCoding_valueForKey_' at NSKeyValueCoding.m:529:10:
/usr/include/bits/string_fortified.h:95:10: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ^
NSKeyValueCoding.m: In function '_i_NSObject_KeyValueCoding_valueForKey_':
NSKeyValueCoding.m:528:10: note: length computed here
  528 |   size = strlen(key);
      |          ^
In function 'strncpy',
    inlined from '_i_NSObject_KeyValueCoding_storedValueForKey_' at NSKeyValueCoding.m:619:7:
/usr/include/bits/string_fortified.h:95:10: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ^
NSKeyValueCoding.m: In function '_i_NSObject_KeyValueCoding_storedValueForKey_':
NSKeyValueCoding.m:618:14: note: length computed here
  618 |       size = strlen(key);
      |              ^
In function 'strncpy',
    inlined from '_i_NSObject_KeyValueCoding_takeStoredValue_forKey_' at NSKeyValueCoding.m:704:7:
/usr/include/bits/string_fortified.h:95:10: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ^
NSKeyValueCoding.m: In function '_i_NSObject_KeyValueCoding_takeStoredValue_forKey_':
NSKeyValueCoding.m:703:14: note: length computed here
  703 |       size = strlen(key);
      |              ^
In function 'strncpy',
    inlined from '_i_NSObject_KeyValueCoding_takeValue_forKey_' at NSKeyValueCoding.m:823:7:
/usr/include/bits/string_fortified.h:95:10: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ^
NSKeyValueCoding.m: In function '_i_NSObject_KeyValueCoding_takeValue_forKey_':
NSKeyValueCoding.m:814:10: note: length computed here
  814 |   size = strlen(key);
      |          ^
In function 'strncpy',
    inlined from 'GSSetupEncodingTable.part.0' at Additions/Unicode.m:341:5:
/usr/include/bits/string_fortified.h:95:10: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ^
Additions/Unicode.m: In function 'GSSetupEncodingTable.part.0':
Additions/Unicode.m:339:23: note: length computed here
  339 |                   l = strlen(entry->iconv);
      |                       ^
In function 'strncpy',
    inlined from 'SetValueForKey' at NSKeyValueCoding.m:95:7,
    inlined from '_i_NSObject_KeyValueCoding_setValue_forKey_' at NSKeyValueCoding.m:370:3:
/usr/include/bits/string_fortified.h:95:10: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ^
NSKeyValueCoding.m: In function '_i_NSObject_KeyValueCoding_setValue_forKey_':
NSKeyValueCoding.m:369:10: note: length computed here
  369 |   size = strlen(key);
      |          ^
In function 'strncpy',
    inlined from 'newDataWithEncodedPort' at NSMessagePort.m:199:3:
/usr/include/bits/string_fortified.h:95:10: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ^
NSMessagePort.m: In function 'newDataWithEncodedPort':
NSMessagePort.m:199:41: note: length computed here
  199 |   strncpy((char*)pi->addr, (char*)name, strlen((char*)name) + 1);
      |                                         ^
/tmp/ccK5XvmG.s: Assembler messages:
/tmp/ccK5XvmG.s:34584: Error: symbol `__objc_class_ref__GSMutableInsensitiveDictionary.lto_priv.1' is already defined
make[5]: *** [/tmp/ccnanzui.mk:194: /tmp/ccIPvrZq.ltrans64.ltrans.o] Error 1

Calling 'mutableBytes' on NSMutableData

Calling 'mutableBytes' on NSMutableData fails with the following message:

NSInvalidArgumentException, reason: NSDataStatic(instance) does not recognize mutableBytes

The following sample reproduces the problem:

#import <Foundation/Foundation.h>

int main( int argc, const char* argv[] )
{

	char* pStore = malloc( 1024 );

	NSMutableData* dataStore =
		[NSMutableData dataWithBytesNoCopy:pStore
						length:1024
					freeWhenDone:YES];

    // getting bytes.
	char* theData = [dataStore mutableBytes];

	return 0;
}

NSLocale/general.m tests fail with ICU 65

seen when building with ICU 65:

base/NSLocale/general.m:
Failed test: general.m:26 ... NSLocaleIdentifier key returns 'es_ES@currency=ESP'
Failed test: general.m:38 ... NSLocaleVariantCode key returns nil
Failed test: general.m:59 ... NSLocaleCurrencySymbol key returns 'xx3'
Failed test: general.m:62 ... NSLocaleCurrencyCode key returns 'ESP'
Failed test: general.m:65 ... NSLocaleCollatorIdentifier for Spain

esting general.m...
Running base/NSLocale/general.m...
Start set: general.m:14 ... NSLocale
Failed test: general.m:26 ... NSLocaleIdentifier key returns 'es_ES@currency=ESP'
Expected 'es_ES@currency=ESP' and got 'es_ES_PREEURO'
Passed test: general.m:29 ... NSLocaleLanguageCode key returns 'es'
Passed test: general.m:32 ... NSLocaleCountryCode key returns 'ES'
Passed test: general.m:36 ... NSLocaleScriptCode key returns nil
Failed test: general.m:38 ... NSLocaleVariantCode key returns nil
Expected '(null)' and got 'PREEURO'
Passed test: general.m:40 ... NSLocaleCollationIdentifier key returns nil
Passed test: general.m:42 ... NSLocaleExemplarCharacterSet key returns a NSCharacterSet
Passed test: general.m:45 ... NSLocaleCalendar key returns a NSCalendar
Passed test: general.m:48 ... NSLocaleUsesMetricSystem key returns a NSNumber
Passed test: general.m:50 ... NSLocaleUsesMetricSystem key returns YES
Passed test: general.m:52 ... NSLocaleMeasurementSystem key returns 'Metric'
Passed test: general.m:55 ... NSLocaleDecimalSeparator key returns ','
Failed test: general.m:59 ... NSLocaleCurrencySymbol key returns 'xx3'
Expected '₧' and got '€' (unicode codepoint 8364)
Failed test: general.m:62 ... NSLocaleCurrencyCode key returns 'ESP'
Expected 'ESP' and got 'EUR'
Failed test: general.m:65 ... NSLocaleCollatorIdentifier for Spain
Expected 'es_ES@currency=ESP' and got 'es_ES_PREEURO'

do these just need updating expected test results?

retain count overflow

After running for about 12 hours, my program dies with this uncaught exception:

Uncaught exception NSInternalInconsistencyException, reason: NSIncrementExtraRefCount() asked to increment too far for <NSIntNumber: 0xefd560> - 1

I searched around my code for any extra retains but couldn't find the problem, plus the odd thing is that while I use NSNumber, I'm using doubles and not integers. Anyways, I ran the program so I could get a stack trace when the exception was raised.

Thread 3 "frogInference" hit Breakpoint 1, -[NSException raise] (self=0x7ffebb74c910, _cmd=0x7ffff7769880 <_OBJC_SELECTOR_TABLE+480>) at NSException.m:1500
(gdb) bt
#0  -[NSException raise] (self=0x7ffebb74c910, _cmd=0x7ffff7769880 <_OBJC_SELECTOR_TABLE+480>) at NSException.m:1500
#1  0x00007ffff72659a9 in +[NSException raise:format:arguments:] (self=<optimized out>, _cmd=<optimized out>, name=0x7ffff776a250 <_OBJC_INSTANCE_4>, 
    format=0x7ffff779ad30 <_OBJC_INSTANCE_5>, argList=0x7ffff11d1cf0) at NSException.m:1392
#2  0x00007ffff7266613 in +[NSException raise:format:] (self=0x7ffff7769bc0 <_OBJC_Class_NSException>, _cmd=<optimized out>, name=0x7ffff776a250 <_OBJC_INSTANCE_4>, 
    format=0x7ffff779ad30 <_OBJC_INSTANCE_5>) at NSException.m:1377
#3  0x00007ffff72c7d98 in objc_retain_fast_np_internal (anObject=0x71d5d0) at NSObject.m:683
#4  0x00007ffff71af392 in GSIMapAddPair (value=..., key=..., map=0x2f4fc6128) at ../Headers/GNUstepBase/GSIMap.h:1078
#5  -[GSMutableDictionary setObject:forKey:] (self=0x2f4fc6120, _cmd=<optimized out>, anObject=0x71d5d0, aKey=0x7ffff7786340 <_OBJC_INSTANCE_2>) at GSDictionary.m:458
#6  0x00007ffff72a8a46 in -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] (self=0x2f4fc4710, _cmd=<optimized out>, 
    aKey=0x7ffff779d460 <_OBJC_INSTANCE_3>) at NSKeyValueObserving.m:1750
#7  0x00007ffff72ca514 in -[NSOperation(Private) _finish] (self=0x2f4fc4710, _cmd=<optimized out>) at NSOperation.m:532
#8  0x00007ffff72cc873 in -[NSOperationQueue(Private) _thread] (self=0x8c2260, _cmd=<optimized out>) at NSOperation.m:989
#9  0x00007ffff7331b78 in nsthreadLauncher (thread=0xc824c450) at NSThread.m:1311
#10 0x00007ffff58e96ba in start_thread (arg=0x7ffff11d2700) at pthread_create.c:333
#11 0x00007ffff6b5041d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Note that none of this is my own code, so it seems to be a bug in base library. I browsed the code but I'm not sure if this is a bug in NSOperation or in the KeyValueObserver.

My code uses NSOperation and NSOperationQueue excessively to parallelize a bunch of compute-intensive calculations. I don't free the NSOperationQueue until the end of the program, here is the inner loop that creates the NSOperation and adds to the queue. This code snippet is also about 3 for loops deep so I eventually run enough operations to hit the retain count.

        for (i = 0; i < numOfObservations; ++i) {
            // snip other stuff
            id io = [[[NSInvocationOperation alloc] initWithTarget: optJob selector: @selector(doVariableOptimize) object: nil] autorelease];
	    [operationQueue addOperation: io];
        }
        [operationQueue waitUntilAllOperationsAreFinished];

I use NSAutoreleasePools at every for loop level because the data I'm processing is quite large, and I watched the retain counts with -autoreleaseCount as part of tracking this down but everything looks fine. I'm using the latest libs-base code from the repository, and this same code runs fine Mac OSX.

I imagine a simple test case that does > 0xfffffe NSOperations might reproduce the bug, but I'm wondering if anybody familiar with the code might have an idea.

Configure failure during check for whether "objc really works"

Hello,

I'm running into an error while building libs-base under Alpine linux using Clang 10. (Libobjc2 installed fine.) During ./configure for libs-base, I get the following error: checking whether objc really works... no

But there's no further indication on what the problem is. Can anyone provide insight?

Complete logs attached.

Thank you,
Patryk

Attachments
log.txt
config.log.txt

$ ./configure
checking build system type... aarch64-unknown-linux-gnu
[...]
checking whether objc really works... no
I don't seem to be able to use your Objective-C compiler to produce
working binaries!  Please check your Objective-C compiler installation.
If you are using gcc-3.x make sure that your compiler's libgcc_s and libobjc
can be found by the dynamic linker - usually that requires you to play
with LD_LIBRARY_PATH or /etc/ld.so.conf.
Please refer to your compiler installation instructions for more help.
configure: error: The Objective-C compiler does not work or is not installed properly.

Build is broken on Ubuntu 16.04

Was building fine recently (1-2 months ago).
Using the script from http://wiki.gnustep.org/index.php/GNUstep_under_Ubuntu_Linux#16.04.2C_16.10.2C_.26_17.04

Trying to build with earlier commits now seems to be also broken, so either I'm doing something wrong (but the script definitely worked before) or one of package updates broke it. Not sure how to deal with this.

touch ./GNUstepBase/GSConfig.h
Making all in Additions ...
Making all for subproject Additions...
 Compiling file GSObjCRuntime.m ...
 Compiling file GSTypeEncoding.c ...
 Compiling file GCObject.m ...
 Compiling file GCArray.m ...
GSObjCRuntime.m:61:26: error: conflicting types for 'objc_get_slot'
extern struct objc_slot *objc_get_slot(Class, SEL);
                         ^
/usr/GNUstep/Local/Library/Headers/objc/runtime.h:865:29: note: previous declaration is here
extern struct objc_slot_v1 *objc_get_slot(Class, SEL)
                            ^
GSObjCRuntime.m:1426:18: warning: incompatible pointer types assigning to 'struct objc_slot *' from 'struct objc_slot_v1 *'
      [-Wincompatible-pointer-types]
              type_slot = objc_get_slot(cls, @selector(retain));
                        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GSObjCRuntime.m:1428:13: warning: incompatible pointer types assigning to 'struct objc_slot *' from 'struct objc_slot_v1 *'
      [-Wincompatible-pointer-types]
              slot = objc_get_slot(cls, typed);
                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:802:29: note: expanded from macro 'strcmp'
     (__builtin_constant_p (s1) && __builtin_constant_p (s2)                  \
                            ^~
GSObjCRuntime.m:1429:43: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                                      ~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:802:58: note: expanded from macro 'strcmp'
     (__builtin_constant_p (s1) && __builtin_constant_p (s2)                  \
                                                         ^~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:803:40: note: expanded from macro 'strcmp'
      && (__s1_len = __builtin_strlen (s1), __s2_len = __builtin_strlen (s2), \
                                       ^~
GSObjCRuntime.m:1429:43: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                                      ~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:803:74: note: expanded from macro 'strcmp'
      && (__s1_len = __builtin_strlen (s1), __s2_len = __builtin_strlen (s2), \
                                                                         ^~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:804:25: note: expanded from macro 'strcmp'
          (!__string2_1bptr_p (s1) || __s1_len >= 4)                          \
                               ^~
/usr/include/x86_64-linux-gnu/bits/string2.h:93:28: note: expanded from macro '__string2_1bptr_p'
  ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
                           ^~~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:804:25: note: expanded from macro 'strcmp'
          (!__string2_1bptr_p (s1) || __s1_len >= 4)                          \
                               ^~
/usr/include/x86_64-linux-gnu/bits/string2.h:93:63: note: expanded from macro '__string2_1bptr_p'
  ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
                                                              ^~~
GSObjCRuntime.m:1429:43: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                                      ~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:805:28: note: expanded from macro 'strcmp'
          && (!__string2_1bptr_p (s2) || __s2_len >= 4))                      \
                                  ^~
/usr/include/x86_64-linux-gnu/bits/string2.h:93:28: note: expanded from macro '__string2_1bptr_p'
  ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
                           ^~~
GSObjCRuntime.m:1429:43: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                                      ~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:805:28: note: expanded from macro 'strcmp'
          && (!__string2_1bptr_p (s2) || __s2_len >= 4))                      \
                                  ^~
/usr/include/x86_64-linux-gnu/bits/string2.h:93:63: note: expanded from macro '__string2_1bptr_p'
  ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
                                                              ^~~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:806:27: note: expanded from macro 'strcmp'
      ? __builtin_strcmp (s1, s2)                                             \
                          ^~
GSObjCRuntime.m:1429:43: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                                      ~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:806:31: note: expanded from macro 'strcmp'
      ? __builtin_strcmp (s1, s2)                                             \
                              ^~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:807:32: note: expanded from macro 'strcmp'
      : (__builtin_constant_p (s1) && __string2_1bptr_p (s1)                  \
                               ^~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:807:58: note: expanded from macro 'strcmp'
      : (__builtin_constant_p (s1) && __string2_1bptr_p (s1)                  \
                                                         ^~
/usr/include/x86_64-linux-gnu/bits/string2.h:93:28: note: expanded from macro '__string2_1bptr_p'
  ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
                           ^~~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:807:58: note: expanded from macro 'strcmp'
      : (__builtin_constant_p (s1) && __string2_1bptr_p (s1)                  \
                                                         ^~
/usr/include/x86_64-linux-gnu/bits/string2.h:93:63: note: expanded from macro '__string2_1bptr_p'
  ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
                                                              ^~~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:808:36: note: expanded from macro 'strcmp'
         && (__s1_len = __builtin_strlen (s1), __s1_len < 4)                  \
                                          ^~
GSObjCRuntime.m:1429:43: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                                      ~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:809:28: note: expanded from macro 'strcmp'
         ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2)               \
                                  ^~
GSObjCRuntime.m:1429:43: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                                      ~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:809:54: note: expanded from macro 'strcmp'
         ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2)               \
                                                            ^~
/usr/include/x86_64-linux-gnu/bits/string2.h:93:28: note: expanded from macro '__string2_1bptr_p'
  ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
                           ^~~
GSObjCRuntime.m:1429:43: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                                      ~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:809:54: note: expanded from macro 'strcmp'
         ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2)               \
                                                            ^~
/usr/include/x86_64-linux-gnu/bits/string2.h:93:63: note: expanded from macro '__string2_1bptr_p'
  ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
                                                              ^~~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:810:26: note: expanded from macro 'strcmp'
            ? __builtin_strcmp (s1, s2)                                       \
                                ^~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
/usr/GNUstep/System/Library/Makefiles/rules.make:479: recipe for target 'obj/Additions.obj/GSObjCRuntime.m.o' failed
make[4]: *** [obj/Additions.obj/GSObjCRuntime.m.o] Error 1
make[4]: *** Waiting for unfinished jobs....
/usr/GNUstep/System/Library/Makefiles/Instance/subproject.make:45: recipe for target 'internal-subproject-all_' failed
make[3]: *** [internal-subproject-all_] Error 2
/usr/GNUstep/System/Library/Makefiles/Master/rules.make:297: recipe for target 'Additions.all.subproject.variables' failed
make[2]: *** [Additions.all.subproject.variables] Error 2
/usr/GNUstep/System/Library/Makefiles/Master/serial-subdirectories.make:53: recipe for target 'internal-all' failed
make[1]: *** [internal-all] Error 2
/usr/GNUstep/System/Library/Makefiles/Master/serial-subdirectories.make:53: recipe for target 'internal-all' failed
make: *** [internal-all] Error 2

NSJSONSerialization serializes all integral NSNumbers as signed numbers

Per https://github.com/gnustep/libs-base/blob/master/Source/NSJSONSerialization.m#L944:

  else if ([obj isKindOfClass: NSNumberClass])
    {
      const char        *t = [obj objCType];

      if (strchr("cCsSiIlLqQ", *t) != 0)
        {
          long long     i = [(NSNumber*)obj longLongValue];

          [output appendFormat: @"%lld", i];
        }
      else
        {
          [output appendFormat: @"%.17g", [(NSNumber*)obj doubleValue]];
        }
    }

Regardless of whether the NSNumber has been created a signed or unsigned variant of numberWith(sign)(size), it'll be JSON-serialized as an unsigned number. This is a problem, because negative numbers can be equal to positive numbers mostly only in C-family languages, and JSON interops with much higher-level languages.

Deadlock in NSOperationQueue

If -[NSThread detachNewThread...] fails (due, say, to running out of memory), it raises an exception. -[NSOperationQueue _execute] contains this snippet:

          [internal->cond lock];
          pending = [internal->starting count];
          [internal->starting addObject: op];

          /* Create a new thread if all existing threads are busy and                                                               
           * we haven't reached the pool limit.                                                                                     
           */
          if (0 == internal->threadCount
            || (pending > 0 && internal->threadCount < POOL))
            {
              internal->threadCount++;
              [NSThread detachNewThreadSelector: @selector(_thread)
                                       toTarget: self
                                     withObject: nil];
            }
          /* Tell the thread pool that there is an operation to start.                                                              
           */
          [internal->cond unlockWithCondition: 1];

Clearly, if detachNewThread... raises an exception, internal->cond is left locked. Hilarity ensues:

2019-02-26 23:43:24.743 mws[5274:5495] [61.111.58.82 60746] Exception: Unable to detach thread (last error Cannot allocate memory)
2019-02-26 23:43:24.743 mws[5274:5495] [23.58.83.196 35434] Verbose logging enabled; socket descriptor = 42
2019-02-26 23:43:24.743 mws[5274:5495] [23.58.83.196 35434] Session started
2019-02-26 23:43:24.744 mws[5274:5495] [96.17.73.210 59603] Transmitted 17 bytes
2019-02-26 23:43:24.744 mws[5274:5495] [23.73.134.191 56302] Transmitted 17 bytes
2019-02-26 23:43:24.744 mws[5274:5495] *** -[NSCondition lock]: deadlock (<NSCondition: 0x8b955b70> (locked by 5495))
2019-02-26 23:43:24.744 mws[5274:5495] *** Break on _NSLockError() to debug.

NSString/test08.m tests fail with ICU 65

base/NSString/test08.m:
Failed test: test08.m:47 ... 11 is greater than 2
Failed test: test08.m:61 ... numeric sort

Testing test08.m...
Running base/NSString/test08.m...
Passed test: test08.m:27 ... 1 is less than 2
Passed test: test08.m:32 ... 1 is less than 10
Passed test: test08.m:37 ... 1 is less than 11
Passed test: test08.m:42 ... 11 is greater than 1
Failed test: test08.m:47 ... 11 is greater than 2
Passed test: test08.m:56 ... text sort
Failed test: test08.m:61 ... numeric sort
Expected '(1, 2, 3, 10, 11, 20)' and got '(1, 10, 11, 2, 20, 3)'
Completed file: test08.m

dispatch cannot be used

Os:Centos 6.7
Is there any way to using dispatch on centos or change os to ubuntu or freebsd!

thanks!

GNUstep.conf in wrong location on FreeBSD

Guessing this is the right repository to report this issue.

GNUstep.conf is located in /usr/local/GNUstep/ when installed via FreeBSD packages. It seems likely that this should actually be /usr/local/etc/GNUstep/

Bus error for timezone access

[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
-[GSTimeZone initWithName:data:] (self=0x4b3fa8, _cmd=<optimized out>, name=0x114b00, data=<optimized out>)
    at NSTimeZone.m:3067
3067          n_trans = GSSwapBigI32ToHost(*(int32_t*)(void*)header->tzh_timecnt);
$4 = {tzh_magic = "TZif", tzh_version = "2", tzh_reserved = '\000' <repeats 14 times>, 
  tzh_ttisutcnt = "\000\000\000\b", tzh_ttisstdcnt = "\000\000\000\b", tzh_leapcnt = "\000\000\000", 
  tzh_timecnt = "\000\000\000\252", tzh_typecnt = "\000\000\000\b", tzh_charcnt = "\000\000\000\021"}

On Solaris 64bit UltraSPARC

First connection to NSDistributedNotificationCenter stuck

I've faced application hang while adding observer to NSDictributesNotificationCenter. If I kill application with SIGKILL and start it again all goes smoothly.

My system is CentOS 7, clang 7.0.1, libobjc2 2.0.
Preferences: NSGlobalDomain NSPortIsMessagePort YES
Application starts when gdomap and gdnc is up and running (application is in loginwindow.service):

[root@next ~]# systemctl status gdomap gdnc loginwindow
● gdomap.service - GNUstep Distributed Objects
   Loaded: loaded (/usr/NextSpace/lib/systemd/gdomap.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2019-12-10 23:21:26 EET; 2 days ago
 Main PID: 838 (gdomap)
   CGroup: /system.slice/gdomap.service
           └─838 /Library/bin/gdomap -p -a /usr/NextSpace/etc/gdomap.interfaces

Dec 10 23:21:26 next.locadomain systemd[1]: Starting GNUstep Distributed Objects...
Dec 10 23:21:26 next.locadomain systemd[1]: Started GNUstep Distributed Objects.

● gdnc.service - GNUstep Distributed Notification Center
   Loaded: loaded (/usr/NextSpace/lib/systemd/gdnc.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2019-12-10 23:21:26 EET; 2 days ago
 Main PID: 840 (gdnc)
   CGroup: /system.slice/gdnc.service
           └─840 /Library/bin/gdnc --daemon -GSPublic YES

Dec 10 23:21:26 next.locadomain systemd[1]: Started GNUstep Distributed Notification Center.

● loginwindow.service - NEXTSPACE Login Panel
   Loaded: loaded (/usr/NextSpace/Apps/Login.app/Resources/loginwindow.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2019-12-13 10:57:07 EET; 41min ago
  Process: 1163 ExecStartPost=/bin/bash -c TERM=linux /usr/bin/clear > /dev/tty1 (code=exited, status=0/SUCCESS)
 Main PID: 1162 (Login)
   CGroup: /system.slice/loginwindow.service
           ├─1162 /usr/NextSpace/Apps/Login.app/Login
           ├─1166 /bin/Xorg :0 -noreset -background none -seat seat0 -nolisten tcp -keeptty vt1
           ├─1176 /Library/bin/gdnc --auto --daemon
           └─1177 /Library/bin/gpbs --daemon

After 5 minutes this message appears in console:

WARNING ... waiting for reply 0 (rootproxy) since 2019-12-13 10:57:09 +0200 on <NSConnection: 0x1575e98> local: '',<NSSocketPort 0x1575b38 on IP any,39626>

Backtrace:

#0  0x00007f4eb3d26bed in poll () at /lib64/libc.so.6
#1  0x00007f4eb4f4beef in -[GSRunLoopCtxt pollUntil:within:] (self=0xfea108, _cmd=0x7f4eb536c1c0 <.objc_selector_list+496>, milliseconds=299999, contexts=0xfba358) at GSRunLoopCtxt.m:391
#2  0x00007f4eb4e3a1e3 in -[NSRunLoop acceptInputForMode:beforeDate:] (self=0xfba318, _cmd=0x7f4eb536c460 <.objc_selector_list+1168>, mode=0xccc818, limit_date=0x1577718) at NSRunLoop.m:1238
#3  0x00007f4eb4e3a793 in -[NSRunLoop runMode:beforeDate:] (self=0xfba318, _cmd=0x7f4eb530b000 <.objc_selector_list+896>, mode=0xccc818, date=0x1577718)
    at NSRunLoop.m:1318
#4  0x00007f4eb4d27941 in -[NSConnection(Private) _getReplyRmc:for:] (self=0x1575e98, _cmd=0x7f4eb530b610 <.objc_selector_list+2448>, sn=0, request=0x7f4eb502a2a2 "rootproxy") at NSConnection.m:3194
#5  0x00007f4eb4d1fa5e in -[NSConnection rootProxy] (self=0x1575e98, _cmd=0x7f4eb530ace0 <.objc_selector_list+96>) at NSConnection.m:1653
#6  0x00007f4eb4d1ac21 in +[NSConnection rootProxyForConnectionWithRegisteredName:host:usingNameServer:] (self=0x86d570, _cmd=0x7f4eb531acd8 <.objc_selector_list+400>, n=0x7f4eb531a700 <.objc_str.86>, h=0x7f4eb531a6e8 <.objc_str.85>, s=0x1563f58) at NSConnection.m:747
#7  0x00007f4eb4d5c7bf in -[NSDistributedNotificationCenter(Private) _connect] (self=0x1560718, _cmd=0x7f4eb531ae18 <.objc_selector_list+720>)
    at NSDistributedNotificationCenter.m:685
#8  0x00007f4eb4d5b6b0 in -[NSDistributedNotificationCenter addObserver:selector:name:object:suspensionBehavior:] (self=0x1560718, _cmd=0x7f4eb531abf8 <.objc_selector_list+176>, anObserver=0x1358308, aSelector=0x61e528 <.objc_selector_list+1536>, notificationName=0x61d3a0 <.objc_str.504>, anObject=0x61d3b8 <.objc_str.505>, suspensionBehavior=2) at NSDistributedNotificationCenter.m:341
#9  0x00007f4eb4d5b409 in -[NSDistributedNotificationCenter addObserver:selector:name:object:] (self=0x1560718, _cmd=0x61e258 <.objc_selector_list+816>, anObserver=0x1358308, aSelector=0x61e528 <.objc_selector_list+1536>, notificationName=0x61d3a0 <.objc_str.504>, anObject=0x61d3b8 <.objc_str.505>)
    at NSDistributedNotificationCenter.m:266
#10 0x000000000040ab52 in -[Controller applicationDidFinishLaunching:] (self=0x1358308, _cmd=0x7f4eb6024da8 <.objc_selector_list+2640>, notif=0x12cff08)
    at Controller.m:589
#11 0x00007f4eb4de433b in -[NSObject performSelector:withObject:] (self=0x1358308, _cmd=0x7f4eb53474e8 <.objc_selector_list+432>, aSelector=0x7f4eb6024da8 <.objc_selector_list+2640>, anObject=0x12cff08) at NSObject.m:2024
#12 0x00007f4eb4dcf969 in -[NSNotificationCenter _postAndRelease:] (self=0xd8e3e8, _cmd=0x7f4eb5347438 <.objc_selector_list+256>, notification=0x12cff08)
    at NSNotificationCenter.m:1198
#13 0x00007f4eb4dd00b4 in -[NSNotificationCenter postNotificationName:object:userInfo:] (self=0xd8e3e8, _cmd=0x7f4eb53473d8 <.objc_selector_list+160>, name=0x7f4eb61c3678 <.objc_str.95>, object=0x1024c08, info=0x0) at NSNotificationCenter.m:1258
#14 0x00007f4eb4dcff87 in -[NSNotificationCenter postNotificationName:object:] (self=0xd8e3e8, _cmd=0x7f4eb6024b28 <.objc_selector_list+2000>, name=0x7f4eb61c3678 <.objc_str.95>, object=0x1024c08) at NSNotificationCenter.m:1238
#15 0x00007f4eb5a38d01 in -[NSApplication _didFinishLaunching] (self=0x1024c08, _cmd=0x7f4eb6024bc8 <.objc_selector_list+2160>) at NSApplication.m:1194
#16 0x00007f4eb5a3a34f in -[NSApplication run] (self=0x1024c08, _cmd=0x7f4eb600f888 <.objc_selector_list+368>) at NSApplication.m:1562
#17 0x00007f4eb5a0fa68 in NSApplicationMain (argc=1, argv=0x7ffe471c6948) at Functions.m:91
#18 0x000000000040f3a4 in main (argc=1, argv=0x7ffe471c6948) at Login_main.m:329

Can't set a value on keypath using NSValue containing a size

#import <Foundation/Foundation.h>

@interface A : NSObject
{
  NSSize _s;
}
@end
@implementation A
- (NSSize) s {
  return self->_s;
}
- (void) setS: (NSSize) s {
  self->_s = s;
}
@end
int main() {
  NSSize in = NSMakeSize(1.0, 2.0);
  NSValue * v = [NSValue valueWithSize: in]; 
  /*
  originally observed with:
  NSValue * v = [NSValue valueWithBytes: &in
                               objCType: @encode(NSSize)];
  */
  A * a = [A new];
  [a setValue: v
       forKey: @"s"];

  return 0;  
}

Output:

$ clang `gnustep-config --objc-flags` `gnustep-config --objc-libs` `gnustep-config --base-libs` repro.m -o repro && ./repro
clang: warning: argument unused during compilation: '-fobjc-nonfragile-abi'
clang: warning: argument unused during compilation: '-fobjc-nonfragile-abi'
2018-05-27 18:45:53.501 repro[14679:14679] match! point is {_NSPoint=dd}, type is {_NSSize=dd}
./repro: Uncaught exception NSInvalidArgumentException, reason: [GSSizeValue-pointValue] should be overridden by subclass
Aborted

(Also filed as https://savannah.gnu.org/bugs/index.php?53994)

NSOrderedSet -- Add hashing mechanism to speed up lookup

fredkiefer 2 days ago Member
This method could be moved to the abstract class.

@fredkiefer
fredkiefer 20 hours ago Member
Or rather not. We should make this method really fast by using a hashing structure in addition to the array. This is the main difference between this class and NSArray, so this may actually be the most important part of the class.

@gcasa
gcasa 18 hours ago Author Member
Okay, cool.

@gcasa
gcasa 4 minutes ago Author Member
Since implementing the hashing structure is more involved I'm going to submit a change request for it.

NSStream should not require subclasses to implement streamError

Apple's documentation says the only methods required to be implemented by subclasses are:

NSInputStream: read:maxLength:, getBuffer:length:, and hasBytesAvailable
NSOutputStream: write:maxLength: and hasSpaceAvailable

streamError is not on either of these lists, so NSStream should provide a stub that returns nil.

Please use pkg-config to detect icu

icu-config has been deprecated by its upstream developers for some years now. In icu 63.1, icu-config is optional to install, but installed by default. In the next version, icu-config will no longer be installed by default.

The developers recommend downstream packages use pkg-config to detect the icu libraries.

Please let me know if you need any help with this change.

NSURL -resourceDataUsingCache: seems to ignore the flag...

NSURL -resourceDataUsingCache: seems to ignore the flag... is this on purpose?

- (NSData*) resourceDataUsingCache: (BOOL)shouldUseCache
{
  NSURLHandle	*handle = [self URLHandleUsingCache: YES];
  NSData	*data = nil;

  if ([handle status] == NSURLHandleLoadSucceeded)
    {
      data = [handle availableResourceData];
    }
  if (shouldUseCache == NO || [handle status] != NSURLHandleLoadSucceeded)
    {
      data = [handle loadInForeground];
    }
  if (nil == data)
    {
      data = [handle availableResourceData];
    }
  return data;
}

Unable to change NSFileModificationDate to '2019-06-28 19:35:09 -0400' - Not a directory, English.lproj/MainMenu.nib

NSFileManager method:

- (BOOL) copyItemAtPath: (NSString*)src
		 toPath: (NSString*)dst
		  error: (NSError**)error

Is failing to copy nib files in buildtool because of this error...

2020-07-09 01:31:59.997 buildtool[1221:1221] ERROR: Unable to change NSFileModificationDate to '2019-06-28 19:35:09 -0400' - Not a directory, English.lproj/MainMenu.nib -> build/Bean/Products/Bean.app/Resources/English.lproj/MainMenu.nib

I don't believe that this should be preventing the copy operation to finish. Updating the creation date should not be a critical failure.

CI currently broken on NSURLConnection tests

It looks like ccb8594 has broken the build on CI. At least build starts to fail there, and changes to NSURLProtocol might be related to breaking NSURLConnection tests.

Perhaps something to do with the use of protocol syntax? All of clang and gcc buids seem to be failing on NSURLConnection related tests.

base/NSURLConnection/basic.m:
Failed file:     basic.m aborted without running all tests!
base/NSURLConnection/test01.m:
Failed file:     test01.m aborted without running all tests!
base/NSURLConnection/test04.m:
Failed file:     test04.m aborted without running all tests!
base/NSURLConnection/test05.m:
Failed file:     test05.m aborted without running all tests!

Unfortunately I cannot see more detailed output.

I suppose it's best to assign to @rfm as this was his push.

Support gnustep-2.0 ABI in GSPrivateSymbolPath()

GSPrivateSymbolPath currently maps from classes into defining objects by looking for the __objc_class_name_* symbol. This fails with the gnustep-2.0 ABI, which uses _OBJC_CLASS as the prefix.

NSDictionary keysSortedByValueUsingComparator: does not return keys sorted by the corresponding value in the dictionary

NSDictionary keysSortedByValueUsingComparator: appears to have a bug. It does not actually return the keys sorted by the values. (Instead it appears to be sorting the keys based on their own value rather than the value each maps to in the dictionary...)

A test illustrating the failure is provided as part of #68

For reference here is what Apple's docs say
"keysSortedByValueUsingComparator:
Returns an array of the dictionary’s keys, in the order they would be in if the dictionary were sorted by its values using a given comparator block."

objc exception atExit handler: NSDecrementExtraRefCount

Hello,

I am trying to use ObjC with ARC, libdispatch and blocks on Linux. I believe I am seeing a problem where the atExit of NSUserDefaults is decrementing a reference count below 0. I have tried to reduce the problem to a very small example.

Last year, using Ubuntu 12.04 and clang 3.4 I built and used ObjC and libobjc2 successfully. I am trying to recreate a similar working environment on Debian 8. I installed clang from 'apt-get'. It is version 3.5.

Two days ago, I received information to use commit 6b28593 in libobjc2 to get past an ivar aliasing problem. That commit fixed the problem I reported there regarding libobjc2.

Here is the program that illustrates the GNUstepBase problem. The arrays are there to illustrate that gnustep-base seems to be working, and that ARC is releasing the arrays. I've added a dispatch timer that waits for 5 seconds and then exits the program. On my old installation, this use of exit() cleanly closes down the program.

//  errorexample3.m
#import <dispatch/dispatch.h>
#import <Foundation/Foundation.h>

@interface Thing : NSObject
@property (readwrite) int i;
@property (readwrite) int j;
@property (readwrite) NSMutableArray * arr;
@end

@implementation Thing

- (id) init {
  if (self = [super init]) {
    _i = 5;
    _j = 17;
    _arr = [[NSMutableArray alloc] init];
    [_arr addObject:@"test1"];
    [_arr addObject:@"test2"];
  }
  return self;
}

@end

int main(int argc, char *argv[])
{

  NSLog(@"starting");

  NSMutableArray *thing = [[NSMutableArray alloc] init];
  [thing addObject:@"one"];
  [thing addObject:@"two"];
  [thing addObject:@"three"];
  NSLog(@"array:%@", thing);
  thing = [[NSMutableArray alloc] init];
  NSLog(@"array:%@", thing);

  Thing *t = [[Thing alloc] init];
  NSLog(@"Thing:%@", t);
  NSLog(@"i:%u", t.i);
  NSLog(@"j:%u", t.j);
  NSLog(@"arr:%@", t.arr);

  void(^timer_listener)();
  timer_listener = ^void(){
    NSLog(@"TIMER BLOCK");
    exit(0);
  };

  // Launch a timer                                                                                                                    
  dispatch_source_t timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER,
                                                   0, 0, dispatch_get_global_queue(0,0));

  NSLog(@" created timer");

  if (timer) {
    dispatch_source_set_timer(timer, dispatch_walltime(NULL, 5.0*NSEC_PER_SEC), 5.0*NSEC_PER_SEC, 0.1*NSEC_PER_SEC);
    dispatch_source_set_event_handler(timer, timer_listener);
    dispatch_resume(timer);
  }


}
  • On my Debian8 install I get this: (using gdb to show the backtrace)
$ gdb errorexample3
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from errorexample3...done.
(gdb) run
Starting program: errorexample3
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
2016-11-12 12:11:51.527 errorexample3[13326:13326] starting
2016-11-12 12:11:51.529 errorexample3[13326:13326] array:(one, two, three)
2016-11-12 12:11:51.529 errorexample3[13326:13326] array:()
2016-11-12 12:11:51.529 errorexample3[13326:13326] Thing:<Thing: 0x925f10>
2016-11-12 12:11:51.529 errorexample3[13326:13326] i:5
2016-11-12 12:11:51.529 errorexample3[13326:13326] j:17
2016-11-12 12:11:51.529 errorexample3[13326:13326] arr:(test1, test2)
2016-11-12 12:11:51.529 errorexample3[13326:13326]  created timer
[New Thread 0x7ffff0b67700 (LWP 13330)]
[New Thread 0x7fffefac5700 (LWP 13332)]
[New Thread 0x7fffef274700 (LWP 13333)]
[New Thread 0x7ffff0316700 (LWP 13331)]
[New Thread 0x7fffeea23700 (LWP 13334)]
2016-11-12 12:11:56.534 errorexample3[13326:13332] TIMER BLOCK
ALERT ... exception while becoming multi-threaded ... system may not be
properly initialised.
errorexample3: Uncaught exception NSInternalInconsistencyException, reason: NSDecrementExtraRefCount() decremented to\
o far

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffefac5700 (LWP 13332)]
0x00007ffff6b4e067 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) where
#0  0x00007ffff6b4e067 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff6b4f448 in __GI_abort () at abort.c:89
#2  0x00007ffff74cff34 in _terminate () at NSException.m:933
#3  0x00007ffff74cfeee in _NSFoundationUncaughtExceptionHandler (exception=0x7fffe400c220) at NSException.m:957
#4  0x00007ffff74ce299 in callUncaughtHandler (value=0x7fffe400c220) at NSException.m:977
#5  0x00007ffff7bb8d64 in objc_exception_throw () from /usr/GNUstep/Local/Library/Libraries/libobjc.so.4.6
#6  0x00007ffff74cf405 in -[NSException raise] (self=0x7fffe400c220, _cmd=0x7ffff7ad58f0 <.objc_selector_list+432>)
    at NSException.m:1148
#7  0x00007ffff74ce653 in +[NSException raise:format:arguments:] (self=0x7ffff7ad56b0 <_OBJC_CLASS_NSException>,
    _cmd=0x7ffff7ad5750 <.objc_selector_list+16>, name=0x7ffff7ad5510 <.objc_str69>, format=0x7ffff7afc680 <.objc_str59>,
    argList=0x7fffefac1b00) at NSException.m:1030
#8  0x00007ffff74ce535 in +[NSException raise:format:] (self=0x7ffff7ad56b0 <_OBJC_CLASS_NSException>,
    _cmd=0x7ffff7afcb10 <.objc_selector_list+144>, name=0x7ffff7ad5510 <.objc_str69>, format=0x7ffff7afc680 <.objc_str59>)
    at NSException.m:1016
#9  0x00007ffff75591fa in NSDecrementExtraRefCountWasZero (anObject=0x811050) at NSObject.m:477
#10 0x00007ffff755ba5c in -[NSObject release] (self=0x811050, _cmd=0x7ffff7b40a50 <.objc_selector_list+1168>) at NSObject.m:1895
#11 0x00007ffff76544aa in +[NSUserDefaults atExit] (self=0x7ffff7b40200 <_OBJC_CLASS_NSUserDefaults>,
    _cmd=0x7ffff7b80b80 <.objc_selector_list+32>) at NSUserDefaults.m:556
#12 0x00007ffff77267b4 in handleExit () at NSObject+GNUstepBase.m:183
#13 0x00007ffff6b50b29 in __run_exit_handlers (status=0, listp=0x7ffff6ebe5a8 <__exit_funcs>,
    run_list_atexit=run_list_atexit@entry=true) at exit.c:82
#14 0x00007ffff6b50b75 in __GI_exit (status=<optimized out>) at exit.c:104
#15 0x000000000040226e in __main_block_invoke (.block_descriptor=<optimized out>) at errorexample3.m:49
#16 0x00007ffff6ed0663 in _dispatch_source_invoke () from /usr/local/lib/libdispatch.so.1
#17 0x00007ffff6ecd162 in _dispatch_queue_invoke () from /usr/local/lib/libdispatch.so.1
#18 0x00007ffff6ecea59 in _dispatch_worker_thread3 () from /usr/local/lib/libdispatch.so.1
#19 0x00007ffff2c8d02e in ?? () from /usr/lib/x86_64-linux-gnu/libpthread_workqueue.so.0
#20 0x00007ffff69040a4 in start_thread (arg=0x7fffefac5700) at pthread_create.c:309
#21 0x00007ffff6c0162d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb) 
  • The recipe I've followed for building libobjc2 and libdispatch are as follows. I've repeated this a few times.
sudo apt -y install clang git ninja cmake libffi-dev libxml2-dev libgnutls28-dev libicu-dev libblocksruntime-dev libkqueue-dev libpthread-workqueue-dev autoconf libtool libjpeg-dev libtiff-dev libffi-dev libcairo-dev libx11-dev libxt-dev libxft-dev libc++-dev

export CC=clang
export CXX=clang

# Checkout sources
git clone https://github.com/nickhutchinson/libdispatch.git
git clone https://github.com/gnustep/libobjc2.git
git clone https://github.com/gnustep/make
git clone https://github.com/gnustep/base.git
git clone https://github.com/gnustep/gui.git
git clone https://github.com/gnustep/back.git

cd libdispatch
mkdir build; cd build
../configure
make
sudo -E make install

cd libobjc2
git checkout 6b28593
cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang -DCMAKE_ASM_COMPILER=clang -DTESTS=OFF
cmake --build .
sudo -E make install

export LDFLAGS=-L/usr/local/lib

cd make
./configure --enable-debug-by-default --with-layout=gnustep --enable-objc-nonfragile-abi
make
sudo -E make install
sudo ldconfig

cd base
make clean
./configure

export LD_LIBRARY_PATH=/usr/local/lib:/usr/GNUstep/Local/Library/Libraries
  • Now build the program. Note the use of the -DOS_OBJECT_USE_OBJC=0 - this seems to be necessary to inform the dispatch headers.
clang -g -o errorexample3 -x objective-c -fobjc-runtime=gnustep-1.8.1 -v -I/usr/local/include/objc -I/usr/GNUstep/Local/Library/Headers -fblocks -fobjc-arc -DOS_OBJECT_USE_OBJC=0 errorexample3.m Journal.m -L/usr/local/lib -L/usr/GNUstep/Local/Library/Libraries  -lobjc -lgnustep-base -ldispatch

Any ideas or pointers are appreciated.

Thanks

pldes and friends should have a NSPropertyListGNUstepFormat output option

pldes and related utilities currently perform plist dumps by using the description family of properties on the parsed object. Doing so causes information loss for NSValue and NSDate entries, a scenario that NSPropertyListGNUstepFormat was exactly invented for. It is my opinion that if a utility is described as a tool for "format conversion", they should get an option for trying to not lose too much data.

Linker error clang-8

I've tried to build this on two platforms with clang 8 and both failed for the same reason. I get the following linker error:

 Linking subproject Additions ...
clang-8: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
/usr/bin/ld: -r and -pie may not be used together
clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [/usr/local/share/GNUstep/Makefiles/Instance/subproject.make:61: obj/subproject.o] Error 1
make[3]: *** [/usr/local/share/GNUstep/Makefiles/Instance/subproject.make:45: internal-subproject-all_] Error 2
make[2]: *** [/usr/local/share/GNUstep/Makefiles/Master/rules.make:297: Additions.all.subproject.variables] Error 2
make[1]: *** [/usr/local/share/GNUstep/Makefiles/Master/serial-subdirectories.make:53: internal-all] Error 2
make: *** [/usr/local/share/GNUstep/Makefiles/Master/serial-subdirectories.make:53: internal-all] Error 2

It's the same on both platforms. The two platforms are:

  • Manjaro Linux
  • Termux (android)

I was just following these instructions both times.

Thanks for your time!
James

Please fix documentation generation

I am entering Documentation directory and punching in make clean && make.

For vast majority of the headers, our documentation generator is printing out:

../Headers/Foundation/NSData.h:375 Unexpected char (-) in declaration
../Headers/Foundation/NSData.h:383 Unexpected char (-) in declaration
../Headers/Foundation/NSData.h:384 Unexpected char (-) in declaration
../Headers/Foundation/NSData.h:392 Argh ... read '}' when looking for ';'
../Headers/Foundation/NSDateFormatter.h:126 Unexpected char (@) in declaration
../Headers/Foundation/NSDateFormatter.h:156 Unexpected char (-) in declaration
../Headers/Foundation/NSDateFormatter.h:168 Unexpected char (-) in declaration
../Headers/Foundation/NSDateFormatter.h:176 Unexpected char (-) in declaration
../Headers/Foundation/NSDateFormatter.h:179 Unexpected char (+) in declaration
../Headers/Foundation/NSDateFormatter.h:180 Unexpected char (+) in declaration
../Headers/Foundation/NSDateFormatter.h:182 Unexpected char (-) in declaration
../Headers/Foundation/NSDateFormatter.h:183 Unexpected char (-) in declaration
../Headers/Foundation/NSDateFormatter.h:184 Unexpected char (-) in declaration
../Headers/Foundation/NSDateFormatter.h:185 Unexpected char (-) in declaration
../Headers/Foundation/NSDateFormatter.h:186 Unexpected char (-) in declaration
../Headers/Foundation/NSDateFormatter.h:187 Unexpected char (-) in declaration

There are many screenfuls of this output. The generated documentation is lacking in actual classes being documented:

image

I have no good theory about what is broken; the lines affected seem rather standard to me. However, I think it's only polite towards the users to consider this a release blocker.

NSURLResponse does not allow for multiple Set-Cookie headers in the same response

According to RFC6265 response headers can contain multiple Set-Cookie headers. However, the [NSURLResponse _setHeaders:] method converts the array of headers into a dictionary keyed by header name. This results in only getting the latest cookie when the server tries to set multiple cookies in the same response.

Perhaps, if it's valid, it would be possible to fold multiple Set-Cookie headers, RFC2956 mentions folding multiple Set-Cookie headers, but RFC6256 says they should not be folded...

And is there a current workaround for this? Perhaps some method I'm missing that would allow me to get the full array of headers having made a request, not just the NSDictionary.

Thanks!

Compilation failure on Windows

Compiling file NSFileCoordinator.m ...
Compiling file NSFileHandle.m ...
NSFileCoordinator.m: In function '-[NSFileCoordinator coordinateAccessWithIntents:queue:byAccessor:]':
NSFileCoordinator.m:156:7: warning: passing argument 1 of 'blockOperationWithBlock:' from incompatible pointer type [enabled by default]
NSFileCoordinator.m:156:7: note: expected 'GSBlockOperationBlock' but argument is of type 'GSAccessorCallbackHandler'
Compiling file NSFileManager.m ...
Compiling file NSFileVersion.m ...
NSFileManager.m: In function '-[NSFileManager changeFileAttributes:atPath:]':
NSFileManager.m:584:29: error: '_S_IFDIR' undeclared (first use in this function)
NSFileManager.m:584:29: note: each undeclared identifier is reported only once for each function it appears in
NSFileManager.m:591:19: warning: unused variable 'ti' [-Wunused-variable]
NSFileManager.m: At top level:
NSFileManager.m:2575:3: error: unknown type name '_WDIR'
NSFileManager.m: In function 'gsedRelease':
NSFileManager.m:2585:3: warning: implicit declaration of function '_wclosedir' [-Wimplicit-function-declaration]
NSFileManager.m: In function '-[NSDirectoryEnumerator initWithDirectoryPath:recurseIntoSubdirectories:followSymlinks:justContents:skipHidden:errorHandler:for:]':
NSFileManager.m:2638:7: error: unknown type name '_WDIR'
NSFileManager.m:2654:7: warning: implicit declaration of function '_wopendir' [-Wimplicit-function-declaration]
NSFileManager.m:2654:19: warning: assignment makes pointer from integer without a cast [enabled by default]
NSFileManager.m: In function '-[NSDirectoryEnumerator nextObject]':
NSFileManager.m:2806:16: warning: implicit declaration of function '_wreaddir' [-Wimplicit-function-declaration]
NSFileManager.m:2806:34: warning: initialization makes pointer from integer without a cast [enabled by default]
NSFileManager.m:2809:22: error: dereferencing pointer to incomplete type
NSFileManager.m:2888:12: error: 'S_IFDIR' undeclared (first use in this function)
NSFileManager.m:2888:24: error: 'S_IFMT' undeclared (first use in this function)
NSFileManager.m:2890:5: error: unknown type name 'WDIR'
NSFileManager.m:2893:7: warning: assignment makes pointer from integer without a cast [enabled by default]
NSFileManager.m: In function '-[GSAttrDictionary filePosixPermissions]':
NSFileManager.m:3876:30: error: 'S_IFMT' undeclared (first use in this function)
NSFileManager.m: In function '-[GSAttrDictionary fileType]':
NSFileManager.m:4034:29: error: 'S_IFMT' undeclared (first use in this function)
NSFileManager.m:4036:12: error: 'S_IFREG' undeclared (first use in this function)
NSFileManager.m:4037:12: error: 'S_IFDIR' undeclared (first use in this function)
NSFileManager.m:4038:12: error: 'S_IFCHR' undeclared (first use in this function)
NSFileManager.m:4039:12: error: 'S_IFBLK' undeclared (first use in this function)
NSFileManager.m:4043:12: error: 'S_IFIFO' undeclared (first use in this function)
NSFileManager.m:4049:1: warning: control reaches end of non-void function [-Wreturn-type]
NSFileManager.m: In function '-[GSAttrDictionary filePosixPermissions]':
NSFileManager.m:3877:1: warning: control reaches end of non-void function [-Wreturn-type]
make[4]: *** [obj/libgnustep-base.obj/NSFileManager.m.o] Error 1
make[4]: *** Waiting for unfinished jobs....
Compiling file NSFileWrapper.m ...
make[3]: *** [internal-library-all
] Error 2
make[2]: *** [libgnustep-base.all.library.variables] Error 2
make[1]: *** [internal-all] Error 2
make: *** [internal-all] Error 2
This is gnustep-make 2.8.0. Type 'make print-gnustep-make-help' for help.
Running in gnustep-make version 2 strict mode.
rm -rf ./*~ ./obj
Making clean in Source ...
rm -rf ./*~ ./obj
rm -f libgnustep-gui.def
Making clean in Images ...
rm -rf ./*~ ./obj
Making clean in Sounds ...
rm -rf ./*~ ./obj
Making clean in Model ...

-[NSArray indexOfObject: inSortedRange: options:0 usingComparator:] raises range exception when object is not found

The following very simple program raises an index error:

#import <Foundation/Foundation.h>

int main() {
        NSArray* ints = @[@(1), @(2)];
        [ints indexOfObject:@(3) inSortedRange:NSMakeRange(0,2) options:0 usingComparator:^(id left, id right) { 
                int diff = [left intValue] - [right intValue];
                if (diff < 0) return NSOrderedAscending;
                if (diff > 0) return NSOrderedDescending;
                return NSOrderedSame;
        }];
}
$ ./obj/index
./obj/index: Uncaught exception NSRangeException, reason: Index 2 is out of range 2 (in 'objectAtIndex:')

It seems to happen because NSArray.m:1211 assumes that GSLeftInsertionPointForKeyInSortedRange returns an index within the collection.

- (NSUInteger) sizeInBytesExcluding: (NSHashTable*)exclude

Source/GSOrderedSet.m
return [self count];
}

  • (NSUInteger) sizeInBytesExcluding: (NSHashTable*)exclude
    @fredkiefer
    fredkiefer 2 days ago Member
    Richard just changed the behaviour of this method in the main branch. You may need to have a look at that change.

@rfm
rfm 2 days ago Member
I can look at that. I'm trying to make the method more automated (so people mostly don't need to override it in subclasses), and while the current code in the main branch works I'm not yet finished with it (I'm wondering whether to use malloc_usable_size() on non-object pointer ivars in the default code).

NSTask fails to show text message on command prompt

The issue may be unrelated to NSTask itself but come from the command prompt environment. Here is a small sample that repeats the issue:

#import <Foundation/Foundation.h>


int main(void)
{
    NSAutoreleasePool *pool = \
        [[NSAutoreleasePool alloc] init];
    if (!pool)
        return 1;

    NSTask *task = nil;

    NSString *command = \
        [NSString stringWithString: @"cmd.exe"];

    NSArray *arguments = \
        [NSArray arrayWithObjects: \
            @"/c", @"dir", nil];

    task = [[[NSTask alloc] init] autorelease];
    if (!task)
        goto ERROR_MAIN;

    [task setLaunchPath: command];
    [task setArguments: arguments];

    [task launch];

    /* Block current program. */
    [task waitUntilExit];

    int status = [task terminationStatus];

    [pool drain];

    return status;

ERROR_MAIN:
    [pool drain];

    return 1;
}

On MinGW console of MSYS2, the program successes to show the message emitted by dir. Nevertheless, on command prompt, the same program fails to show the message emitted by dir.

-[NSURL URLByAppendingPathComponent:] only works if URL had a path component to begin with

#include <Foundation/Foundation.h>

int main() {
        NSURL* url = [NSURL URLWithString:@"http://www.example.com"];
        NSURL* next = [url URLByAppendingPathComponent:@"example_path"];
        NSLog(@"%@", next);
}

This outputs "http://www.example.com/". Using this base URL instead:

NSURL* url = [NSURL URLWithString:@"http://www.example.com/"];

(notice the trailing forward slash)

then we actually get "http://www.example.com/example_path".

Apple's implementation returns "http://www.example.com/example_path" for both.

Windows 2000 experience.

Hello.

Stated that the previous version works on Windows 2000

http://www.gnustep.org/windows/installer.html

I managed build current release version gnustep on Windows 2000.

https://imgur.com/a/0yIvjoj

(gnustep-make-2.7.0
gnustep-base-1.26.0
gnustep-gui-0.27.0
gnustep-back-0.27.0
plugins-themes-WinUXTheme-master)

I only had a couple of problems.

1 ICU 50 didn't support Windows 2000.

ICU 50 uses GetGeoInfoW
https://github.com/unicode-org/icu/blob/4509ab7d96fe996d528ce5db650a031cefee7435/icu4c/source/common/wintz.cpp#L71
GetGeoInfoW : Minimum supported client Windows XP
https://msdn.microsoft.com/en-us/windows/desktop/dd318099?f=255&MSPPError=-2147217396
ICU 49 works.
I changed only two lines in gnustep source.
instead 949 and 950 lines

timeStyle = pat ? UDAT_PATTERN : NSToUDateFormatStyle (internal->_timeStyle);

dateStyle = pat ? UDAT_PATTERN : NSToUDateFormatStyle (internal->_dateStyle);

I used:

timeStyle = NSToUDateFormatStyle (internal->_timeStyle);
dateStyle = NSToUDateFormatStyle (internal->_dateStyle);

2 Configure issues

I changed configure here and in libs-gui to work with icu 49.
instead of harcoded libs (https://github.com/gnustep/libs-gui/blob/master/configure.ac#L464) I used pkg-config

3 Themes didn't work on Windows 2000

The issue because Windows 2000 doesn't have uxtheme.dll.
But I found the site: https://kzar.co.uk/blog/2010/10/06/fixing-spotify-uxtheme.dll-error-on-windows-2000/
It works with the dll.

Give us feedback! Tell us what you like; tell us what you think could be better.

Thank you, few toolkits work in 2019 on Windows 2000.

I saw that: https://groups.google.com/forum/#!topic/gnu.gnustep.discuss/d4CSDyz29Rk

I don’t know if ifdef is needed in your code, maybe such a note will be enough for those who need to build gnustep to work on Windows 2000

I built gnustep with support Windows 2000 just for fun, not for real need.

Performance improvements in NSOrderedSet

RFM Commented:

I have to apologise for taking so very long before I had a chance to look at this issue at all. even now I've really only had a quick look, concentrating on the concrete implementation. I also had a quick skim of the Apple documentation.
One paragraph from the intro of the documentation struck me:

You can use ordered sets as an alternative to arrays when the order of elements is important and performance in testing whether an object is contained in the set is a consideration—testing for membership of an array is slower than testing for membership of a set.

This suggests to me that the current concrete class implementation (based on GSIArray) may be a problematic approach: perhaps the representation should fundamentally be a hash-map to rapid testing of membership, rather than an array for rapid enumeration and access by index (or both data structures could be used to hold the same objects).

If we assume that it's acceptable for access by index to be really slow for very large collections, it would be possible to implement this based on an extended version of GSIMap (or some other hash table implementation), since this contains a linked list of nodes (and of course the linked list would be used to provide ordering and access by index). The modification required would be having an alternative version of the node addition code to maintain the linked list ordering, as well as a version of the code to resize the GSIMap (so it maintains the list ordering).

Alternatively, (simplest code approach giving high performance for both forms of access, but higher memory footprint), I'd use both a GSIMap and a GSIArray and store objects in both. In that case it would make sense to configure one data structure to manage retain/release and the other data structure to refrain from doing retain/release.

Write tests for the "passingTest" methods in NSOrderedSet

Source/NSOrderedSet.m
options:(NSEnumerationOptions)opts
passingTest:(GSPredicateBlock)predicate
{
return [[self objectsAtIndexes: indexSet]
@fredkiefer
fredkiefer 18 days ago Member
I would expect that this yields the wrong result, as the index will be from the wrong set.

@gcasa
gcasa 16 days ago Author Member
I will write a test on macOS and compare output when the test is moved over to GNUstep

@gcasa Reply…
Source/NSOrderedSet.m
options:(NSEnumerationOptions)opts
passingTest:(GSPredicateBlock)predicate
{
return [[self objectsAtIndexes: indexSet]
@fredkiefer
fredkiefer 18 days ago Member
Again I think this is wrong.

@gcasa
gcasa 16 days ago Author Member
I will write a test on macOS and compare output when the test is moved over to GNUstep

Add plutil(1)

Since its introduction in Mac OS X 10.2, many users of the said system have started to seen plutil(1) as the only plist command-line editor. plutil(1) is a program that does most of pldes(1) and friend does, but all put in one tool. Around macOS 10.15, plutil(1) seems to have received a lot of editing capabilities that are not found in online manpages.

I am currently working on a version of plutil for GNUstep, sans the programming language and JSON literal features for now. This issue is really just for a future pull request reference.

plutil(1) manpage in macOS 10.14: https://www.unix.com/man-page/mojave/1/plutil
plutil(1) manpage in macOS 10.15: plutil.1.gz


A related utility found on macOS but not yet in GS is PlistBuddy. Both utilities have a MIT/Expat licensed C++ implementation by Facebook at https://github.com/facebook/xcbuild/tree/master/Libraries/plist/Tools. I am mainly writing plutil(1) from scratch for the new 10.15 features.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.