Giter VIP home page Giter VIP logo

postgresql-kit's People

Contributors

djthorpe avatar ericrisler 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

Watchers

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

postgresql-kit's Issues

Missing libqp-events symbols in final framework build

Hi, seems that the build process somehow loses some symbols when building the framework. I'm trying to use the libpq-events functions but am getting an "undefined symbol" linker error.

I ran nm on the libpq.a that is generated and see the various symbols (_PQinstance is one such symbol). When I run nm on the framework library, the symbol is not there!

Any idea?

PGClientKit implementation on iOS

When is this framework will be available to use? I am working on an application which access database from a PostgreSQL server. I seriously need help with this. I can't find any other way to do this.

Mavericks XCode 6 iOS 8.1 compiling postgresql-kit

Running: etc/build-frameworks.sh

Most the parts receive: ** BUILD SUCCEEDED *, but the last part gives me: * BUILD FAILED ** as follows:

=== BUILD AGGREGATE TARGET openssl_ios OF PROJECT postgresql-kit WITH CONFIGURATION Release ===

Check dependencies

PhaseScriptExecution Run\ Script build/postgresql-kit.build/Release/openssl_ios.build/Script-6E83260B17AD15C9002AFCBC.sh
cd /Users/dev/Documents/source/postgresql-kit
/bin/sh -c /Users/dev/Documents/source/postgresql-kit/build/postgresql-kit.build/Release/openssl_ios.build/Script-6E83260B17AD15C9002AFCBC.sh
Making /Users/dev/Documents/source/postgresql-kit/tar/openssl-1.0.1e.tar.gz
Assuming already exists: /Users/dev/Documents/source/postgresql-kit/build/Release/openssl-1.0.1e/ios_armv7
Assuming already exists: /Users/dev/Documents/source/postgresql-kit/build/Release/openssl-1.0.1e/ios_armv7s
Assuming already exists: /Users/dev/Documents/source/postgresql-kit/build/Release/openssl-1.0.1e/ios_simulator

OpenSSL installed: /Users/dev/Documents/source/postgresql-kit/build/Release/openssl-current

=== BUILD AGGREGATE TARGET libpq_ios OF PROJECT postgresql-kit WITH CONFIGURATION Release ===

Check dependencies

PhaseScriptExecution Run\ Script build/postgresql-kit.build/Release/libpq_ios.build/Script-6E83261217AD15F3002AFCBC.sh
cd /Users/dev/Documents/source/postgresql-kit
/bin/sh -c /Users/dev/Documents/source/postgresql-kit/build/postgresql-kit.build/Release/libpq_ios.build/Script-6E83261217AD15F3002AFCBC.sh
Making /Users/dev/Documents/source/postgresql-kit/tar/postgresql-9.2.4.tar.gz
Output to /Users/dev/Documents/source/postgresql-kit/build/Release
~/Documents/source/postgresql-kit/build/postgresql-kit.build/Release/libpq_ios.build/DerivedSources/postgresql-9.2.4 ~/Documents/source/postgresql-kit
Derived data: /Users/dev/Documents/source/postgresql-kit/build/postgresql-kit.build/Release/libpq_ios.build/DerivedSources
Build to: /Users/dev/Documents/source/postgresql-kit/build/Release/postgresql-9.2.4/ios_armv7
Architecture: armv7
Flags: --host=arm-apple-darwin --enable-thread-safety --without-readline --with-openssl --with-includes=/Users/dev/Documents/source/postgresql-kit/build/Release/openssl-current/include --with-libs=/Users/dev/Documents/source/postgresql-kit/build/Release/openssl-current/lib
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking build system type... i386-apple-darwin13.4.0
checking host system type... arm-apple-darwin
checking which template to use... darwin
checking whether to build with 64-bit integer date/time support... yes
checking whether NLS is wanted... no
checking for default port number... 5432
checking for block size... 8kB
checking for segment size... 1GB
checking for WAL block size... 8kB
checking for WAL segment size... 16MB
checking for arm-apple-darwin-gcc... /usr/bin/gcc -arch armv7
checking for C compiler default output file name...
configure: error: in /Users/dev/Documents/source/postgresql-kit/build/postgresql-kit.build/Release/libpq_ios.build/DerivedSources/postgresql-9.2.4': configure: error: C compiler cannot create executables Seeconfig.log' for more details.
Makefile:14: ../../../src/Makefile.global: No such file or directory
Makefile:80: /src/Makefile.shlib: No such file or directory
make: *** No rule to make target `/src/Makefile.shlib'. Stop.

** BUILD FAILED **

The following build commands failed:
PhaseScriptExecution Run\ Script build/postgresql-kit.build/Release/libpq_ios.build/Script-6E83261217AD15F3002AFCBC.sh
(1 failure)

That said there is a libcrypto.a ( OpenSSL 1.0.1e ) file in this folder: /Users/dev/Documents/source/postgresql-kit/build/Release/openssl-current/lib/ accompanied with libssl.a

How can I update this to PostgreSQL 9.4 and OpenSSL 1.0.1j?

PGClientKit.framework/Headers/PGClientKit.h:33:9: 'PGResult+TextTable.h' file not found

Dragged and dropped PGClientKit.framework file inside my Mac OS X project (from the "postgresql-kit pre release v5" zip file at: https://github.com/djthorpe/postgresql-kit/releases/download/alpha-005/release-postgresql-kit-alpha005.zip )

When I simply include #import <PGClientKit/PGClientKit.h> into my AppDelegate, and try to compile, I get the following error:

/Users/myusername/Projects/mypgapp/PGClientKit.framework/Headers/PGClientKit.h:33:9: 'PGResult+TextTable.h' file not found

Any idea?

does not compile on 10.10 with Xcode 6.2

I'm interested in trying this out so I did this on a 10.10 machine with Xcode 6.2 and its commandline tools installed.

cd etc
./build-macapps.sh

and it failed. Here's the end of the output

CompileC build/postgresql-kit.build/Release/PGFoundationClient.build/Objects-normal/x86_64/PGFoundationClient2.o src/Apps/Foundation/PGFoundationClient2.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/dreed/Projects/postgresql-kit
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=80 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.9 -g -fvisibility=hidden -Wno-sign-conversion -I/Users/dreed/Projects/postgresql-kit/build/postgresql-kit.build/Release/PGFoundationClient.build/PGFoundationClient.hmap -I/Users/dreed/Projects/postgresql-kit/build/Release/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/dreed/Projects/postgresql-kit/build/postgresql-kit.build/Release/PGFoundationClient.build/DerivedSources/x86_64 -I/Users/dreed/Projects/postgresql-kit/build/postgresql-kit.build/Release/PGFoundationClient.build/DerivedSources -F/Users/dreed/Projects/postgresql-kit/build/Release -MMD -MT dependencies -MF /Users/dreed/Projects/postgresql-kit/build/postgresql-kit.build/Release/PGFoundationClient.build/Objects-normal/x86_64/PGFoundationClient2.d --serialize-diagnostics /Users/dreed/Projects/postgresql-kit/build/postgresql-kit.build/Release/PGFoundationClient.build/Objects-normal/x86_64/PGFoundationClient2.dia -c /Users/dreed/Projects/postgresql-kit/src/Apps/Foundation/PGFoundationClient2.m -o /Users/dreed/Projects/postgresql-kit/build/postgresql-kit.build/Release/PGFoundationClient.build/Objects-normal/x86_64/PGFoundationClient2.o

Ld build/Release/PGFoundationClient normal x86_64
cd /Users/dreed/Projects/postgresql-kit
export MACOSX_DEPLOYMENT_TARGET=10.9
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -L/Users/dreed/Projects/postgresql-kit/build/Release -F/Users/dreed/Projects/postgresql-kit/build/Release -filelist /Users/dreed/Projects/postgresql-kit/build/postgresql-kit.build/Release/PGFoundationClient.build/Objects-normal/x86_64/PGFoundationClient.LinkFileList -mmacosx-version-min=10.9 -fobjc-arc -fobjc-link-runtime -framework PGClientKit -framework Foundation -ledit.3 -Xlinker -dependency_info -Xlinker /Users/dreed/Projects/postgresql-kit/build/postgresql-kit.build/Release/PGFoundationClient.build/Objects-normal/x86_64/PGFoundationClient_dependency_info.dat -o /Users/dreed/Projects/postgresql-kit/build/Release/PGFoundationClient
ld: framework not found PGClientKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

The following build commands failed:
CompileC build/postgresql-kit.build/Release/PGClientKit_mac.build/Objects-normal/x86_64/PGQuery.o src/Frameworks/PGClientKit/PGQuery.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/postgresql-kit.build/Release/PGClientKit_mac.build/Objects-normal/x86_64/PGQueryCreate.o src/Frameworks/PGClientKit/PGQueryCreate.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/postgresql-kit.build/Release/PGClientKit_mac.build/Objects-normal/x86_64/PGSelect.o src/Frameworks/PGClientKit/PGSelect.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
MasterObjectLink build/postgresql-kit.build/Release/PGClientKit_mac.build/Objects-normal/PGClientKit-x86_64-master.o
Ld build/Release/PGClientKit.framework/Versions/A/PGClientKit normal x86_64
Ld build/Release/PGFoundationClient normal x86_64
(6 failures)

compiled Project

Hi
I am interested in your brilliant project
but I would prefer to get the compiled project instead of compile it myself.
the reason is that I don't know what installation of Xcode you have and how you solved ( a lot of missing Headerfiles (System) this problems or maybe you never had them.

So if you could post the usable Frameworks and so on I could concentrate on my Project with the help of your Project
Thanks in advance

Library not found issue

Hi,

I want to integrate the PosgresSQL server in one of my mac app. I just build manually and created the PGClient framework (As per https://github.com/djthorpe/postgresql-kit/wiki/PGClientKit). But it throws an exception at runtime(Build successful).

Exception:
dyld: Library not loaded: @executable_path/../Frameworks/PGClientKit.framework/Versions/A/PGClientKit

Can you help me regarding this?

stdlib.h: file not found

Hi.
I'm trying to build the whole set, frameworks, sample apps, etc., with OsX as target machine.
I've OsX 10.9 and Xcode 6.0.2 (no osx10.8.sdk available, i know).
The build fails at the vary beginning upon building openssl.
The compiler scrip apparently cannot find "stdlib.h".
A snippet from the log:
...
making links in ssl...
ssl.h => ../include/openssl/ssl.h
ssl2.h => ../include/openssl/ssl2.h
/Users//Documents/SviluppoApplicazioni/postgresql-kit/cryptlib.h:62:10: 'stdlib.h' file not found

Any help?

Thank you everybody

build-frameworks.sh not working on 10.11

The script seems not to be working on 10.11.

Something goes wrong when checking for OpenSSL:

configure: error: library 'crypto' is required for OpenSSL
Makefile:14: ../../../src/Makefile.global: No such file or directory
Makefile:81: /src/Makefile.shlib: No such file or directory
make: *** No rule to make target `/src/Makefile.shlib'.  Stop.

** BUILD FAILED **

The following build commands failed:
    PhaseScriptExecution Run\ Script build/postgresql-kit.build/Release/libpq_ios.build/Script-6E83261217AD15F3002AFCBC.sh
(1 failure)

I checked my OpenSSL install and everything seems fine. Anyone have any ideas on what could be wrong?

'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: size'

Great work building this framework. I think I've found a logic error that trips an assert.

I'm running Xcode5,iOS7SDK, I added your project as a sub-project to mine and updated your project with the most recent version of the iOS-Universal-Framework.

Everything builds and connects to my remote postgesql (osx Mavericks, postgres 92 that is part of the system) db just fine. Here is the issue I'm encountering:

When I run a query against a table that contains rows with empty character varying values (i.e. zero length strings, NOT null values) the -_tupleForRow:column: method's NSParameterAssert(size) assert trips when I call the -fetchRowAsArray method. Your code:

-(NSObject\* )_tupleForRow:(NSUInteger)r column:(NSUInteger)c { // check for null if(PQgetisnull(_result,(int)r,(int)c)) { return [NSNull null]; } // get bytes, length const void\* bytes = PQgetvalue(_result,(int)r,(int)c); NSUInteger size = PQgetlength(_result,(int)r,(int)c); NSParameterAssert(bytes); NSParameterAssert(size);
switch(_format) {
    case PGClientTupleFormatText:
        return pgdata_text2obj(PQftype(_result,(int)c),bytes,size,_encoding);
    case PGClientTupleFormatBinary:
        return pgdata_bin2obj(PQftype(_result,(int)c),bytes,size,_encoding);
    default:
        return nil;
}

}

The if(PQgetisnull(_result,(int)r,(int)c)) returns false on empty string and zeros according to the libpq library documentation but the PQgetlength will return the string length for text values and the byte length for binary values. So, on empty string fields this returns 0 and trips your assert.

My fix was to comment out the NSParameterAssert(size); assert. And in the pgdata_bin2obj and pgdata_text2obj functions I changed the assert from assert(oid && bytes && size); to assert(oid && bytes);

Can you kindly check if all this makes sense?

PGServer Starting

I run this project but i have some problems, When i press click in start button, the app create a folder in /Library/Application Support/PostgreSQL/ with all files that it needed, but when the app try star the server give me this messages:

The files belonging to this database system will be owned by user "XXX".
This user must also own the server process.
The database cluster will be initialized with locale "C".
The default text search configuration will be set to "english".
fixing permissions on existing directory /Users/Library/Application Support/PostgreSQL ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 8000kB
creating configuration files ...
ok
creating template1 database in /Users/Library/Application Support/PostgreSQL/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/Users/Library/Developer/Xcode/DerivedData/postgresql-kit-caqcaokdiccetzgtnxmdvbbzdsqp/Build/Products/Debug/PGServerKit.framework/Resources/postgresql-current-mac_x86_64/bin/postgres -D /Users/Library/Application Support/PostgreSQL
or
/Users/Library/Developer/Xcode/DerivedData/postgresql-kit-caqcaokdiccetzgtnxmdvbbzdsqp/Build/Products/Debug/PGServerKit.framework/Resources/postgresql-current-mac_x86_64/bin/pg_ctl -D /Users/Library/Application Support/PostgreSQL -l logfile start
FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
Task ended with status 1

I'm new in this, can you help me? how i fix it? ...

** BUILD FAILED **

Making /Users/piotrkeler/Desktop/postgresql/tar/postgresql-9.4.0.tar.gz
Output to /Users/piotrkeler/Desktop/postgresql/build/Release
Using openssl libraries: /Users/piotrkeler/Desktop/postgresql/build/Release/openssl-current-mac_x86_64
SDK does not exist: macosx10.10
Command /bin/sh failed with exit code 255

** BUILD FAILED **

The following build commands failed:
PhaseScriptExecution Run\ Script build/postgresql-kit.build/Release/postgresql_mac.build/Script-6E256FF415F255D00079AD2D.sh
(1 failure)

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.