HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • ← Previous Ticket
  • Next Ticket →

Ticket #626 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

SWI prolog port (bep and patch)

Reported by: munchausen Owned by:
Priority: normal Milestone:
Component: dev-lang/swi-prolog Version:
Severity: normal Keywords:
Cc:

Description

Currently fails one regression test due to haiku ticket 8914 ( https://dev.haiku-os.org/ticket/8914), but that doesnt actually affect anything in swipl except for that test.

Also will fail threading tests until patch from haiku ticket  https://dev.haiku-os.org/ticket/8912 is applied, and this will affect stability/usability.

Will not build with gcc2.

With gcc4 will build/install/package fine

Attachments

swipl-6.0.2.patch​ (2.0 KB) - added by munchausen 3 years ago.
swipl-6.2.0.patch​ (2.0 KB) - added by munchausen 3 years ago.
swipl-6.0.2.bep​ (711 bytes) - added by munchausen 3 years ago.
swipl-6.2.0.bep​ (711 bytes) - added by munchausen 3 years ago.
swiprolog​ (899 bytes) - added by munchausen 3 years ago.
SWI prolog license addendum to LGPL v2.1

Download all attachments as: .zip

Change History

Changed 3 years ago by munchausen

  • attachment swipl-6.0.2.patch​ added

comment:1 follow-up: ↓ 3 Changed 3 years ago by munchausen

SWI has a modified GPL license. How do I add a new license?

Changed 3 years ago by munchausen

  • attachment swipl-6.2.0.patch​ added

comment:2 Changed 3 years ago by munchausen

Added bep/patch for latest version (only released last week)

comment:3 in reply to: ↑ 1 ; follow-ups: ↓ 4 ↓ 10 Changed 3 years ago by scottmc

Replying to munchausen:

SWI has a modified GPL license. How do I add a new license?

For cases where a license file doesn't exist in Haiku's license directory already, you can add a licenses directory and copy the new license file into it. You can find several examples of this in the HaikuPorts? tree, such as Python in dev-lang/python. The name of this file needs to match the license name in the bep. Another example would be Boost:
http://ports.haiku-files.org/changeset/2027

Changed 3 years ago by munchausen

  • attachment swipl-6.0.2.bep​ added

Changed 3 years ago by munchausen

  • attachment swipl-6.2.0.bep​ added

Changed 3 years ago by munchausen

  • attachment swiprolog​ added

SWI prolog license addendum to LGPL v2.1

comment:4 in reply to: ↑ 3 Changed 3 years ago by munchausen

Replying to scottmc:

For cases where a license file doesn't exist in Haiku's license directory already, you can add a licenses directory and copy the new license file into it. You can find several examples of this in the HaikuPorts? tree, such as Python in dev-lang/python. The name of this file needs to match the license name in the bep. Another example would be Boost:
http://ports.haiku-files.org/changeset/2027

Have modified beps and attached license

comment:5 Changed 3 years ago by zooey

When I tried building swi-prolog-6.2 on Haiku (hrev44582, with gcc-4.6.2), it fails with the following error output:

gcc -Wall -O2 -I/boot/common/include -fno-strict-aliasing  -o defatom ./defatom.c
./defatom "."
cc -g -O2 -o mkvmi ./mkvmi.c
./mkvmi "."
gcc -c -I. -I. -I./rc -Wall -O2 -I/boot/common/include -fno-strict-aliasing  pl-atom.c -o pl-atom.o
pl-atom.c: In function 'PL_unregister_atom':
pl-atom.c:939:12: warning: the address of 'PL_local_data' will always evaluate as 'true' [-Waddress]
pl-atom.c: In function 'pl_current_blob2_va':
pl-atom.c:1225:3: error: 'PRED_LD' undeclared (first use in this function)
pl-atom.c:1225:3: note: each undeclared identifier is reported only once for each function it appears in
pl-atom.c:1227:3: error: expected ';' before 'return'
pl-atom.c:1228:1: warning: no return statement in function returning non-void [-Wreturn-type]
pl-atom.c: In function 'pl_current_atom1_va':
pl-atom.c:1233:3: error: 'PRED_LD' undeclared (first use in this function)
pl-atom.c:1235:3: error: expected ';' before 'return'
pl-atom.c:1236:1: warning: no return statement in function returning non-void [-Wreturn-type]
pl-atom.c: In function 'pl_blob2_va':
pl-atom.c:1246:3: error: unknown type name 'PRED_LD'
pl-atom.c:1247:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pl-atom.c:1249:24: error: 'bt' undeclared (first use in this function)
pl-atom.c: In function 'pl_atom_references2_va':
pl-atom.c:1258:3: error: unknown type name 'PRED_LD'
pl-atom.c:1259:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'atom'
pl-atom.c:1261:8: error: 'atom' undeclared (first use in this function)
pl-atom.c: In function 'atom_generator':
pl-atom.c:1515:12: warning: the address of 'PL_local_data' will always evaluate as 'true' [-Waddress]
pl-atom.c: At top level:
pl-atom.c:1151:1: warning: 'current_blob' defined but not used [-Wunused-function]
make: *** [pl-atom.o] Error 1
Traceback (most recent call last):
  File "/boot/common/bin/haikuporter", line 1192, in <module>
    haikuporter = HaikuPorter(options, args)
  File "/boot/common/bin/haikuporter", line 293, in __init__
    self.buildPort()
  File "/boot/common/bin/haikuporter", line 754, in buildPort
    self.runCommandSequence(self.bepKeys['BUILD'], self.workDir)
  File "/boot/common/bin/haikuporter", line 987, in runCommandSequence
    check_call(commandString, shell=True, cwd=dir, env=shellEnv)
  File "/boot/common/lib/python2.6/subprocess.py", line 488, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'set -e
cd pl-6.2.0/src
libtoolize -fci
autoreconf
LDFLAGS=-L/boot/common/lib CFLAGS=-I/boot/common/include ./configure --prefix=$(finddir B_COMMON_DIRECTORY)
make
' returned non-zero exit status 2

Before invocation of haikuporter, I'd put the bep and the patch into the usual places (dev-lang/swi-prolog in this case). Any clues?

comment:6 Changed 3 years ago by munchausen

Well, the bep and patch should be in folder swipl rather than swi-prolog, but I dont know if that would break it. Ticket 8912 has been applied in that revision so it should work, I will try now installing that hrev and see if I can find the cause. PRED_LD being not being found suggests that the patch wasn't applied properly.

Last edited 3 years ago by munchausen (previous) (diff)

comment:7 follow-up: ↓ 8 Changed 3 years ago by munchausen

Works for me on hrev44581. I can only assume the patch didn't apply because the folder name didn't match the patch name.

comment:8 in reply to: ↑ 7 ; follow-up: ↓ 9 Changed 3 years ago by zooey

  • Resolution set to fixed
  • Status changed from new to closed

Replying to munchausen:

Works for me on hrev44581. I can only assume the patch didn't apply because the folder name didn't match the patch name.

Correct, I didn't name the patch file correctly, builds and works now.

I've added both versions of swi-prolog to the repository (r2033), thanks!

Indeed there seems to be some kind of problem with our interpretation/filling of TZ, but that is tracked in the corresponding ticket in Haiku's Trac. Closing this one, since swi-prolog seems to work just fine.

comment:9 in reply to: ↑ 8 Changed 3 years ago by munchausen

Replying to zooey:

Indeed there seems to be some kind of problem with our interpretation/filling of TZ, but that is tracked in the corresponding ticket in Haiku's Trac. Closing this one, since swi-prolog seems to work just fine.

Yeah I raised both the tickets related to this. I wish I could change my login name on the haiku trac... maybe I should just create a new account as my names now don't match between here and there.

comment:10 in reply to: ↑ 3 ; follow-up: ↓ 12 Changed 3 years ago by scottmc

Replying to scottmc:

Replying to munchausen:

SWI has a modified GPL license. How do I add a new license?

For cases where a license file doesn't exist in Haiku's license directory already, you can add a licenses directory and copy the new license file into it. You can find several examples of this in the HaikuPorts? tree, such as Python in dev-lang/python. The name of this file needs to match the license name in the bep. Another example would be Boost:
http://ports.haiku-files.org/changeset/2027

Also, when adding licenses we should try to use Capitals that match how the license text writes them, in this case it's "SWI-Prolog", this would make it consistent with how the licenses that are included in Haiku are named as well.
In the Copyright line we drop the Copyright (C) part as that is inserted automatically for us by Haiku when an Optional Package is installed, so just start the line with the year range.

These fields are used by Haiku to generate the text that is used in the About System...

comment:11 Changed 3 years ago by scottmc

  • Component changed from default to dev-lang/swi-prolog

comment:12 in reply to: ↑ 10 Changed 3 years ago by munchausen

Replying to scottmc:

Also, when adding licenses we should try to use Capitals that match how the license text writes them, in this case it's "SWI-Prolog", this would make it consistent with how the licenses that are included in Haiku are named as well.
In the Copyright line we drop the Copyright (C) part as that is inserted automatically for us by Haiku when an Optional Package is installed, so just start the line with the year range.

These fields are used by Haiku to generate the text that is used in the About System...

Noted, thanks

EDIT: How about "all rights reserved" remove it?

Last edited 3 years ago by munchausen (previous) (diff)
Note: See TracTickets for help on using tickets.

Download in other formats:

  • Comma-delimited Text
  • Tab-delimited Text
  • RSS Feed

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/