Package Details: lparse 1.1.2-2

Git Clone URL: https://aur.archlinux.org/lparse.git (read-only, click to copy)
Package Base: lparse
Description: Lparse is a front-end to smodels that generates a variable-free simple logic
Upstream URL: http://www.tcs.hut.fi/Software/smodels/
Licenses: GPL2
Submitter: Luker88
Maintainer: Luker88
Last Packager: Luker88
Votes: 0
Popularity: 0.000000
First Submitted: 2015-11-09 20:09 (UTC)
Last Updated: 2018-06-08 16:25 (UTC)

Latest Comments

petrosagg commented on 2018-06-03 05:58 (UTC) (edited on 2018-06-03 06:06 (UTC) by petrosagg)

The build fails with the following error during ./configure:

Unimplemented: POSIX::tmpnam() at ./configure line 37.

And a bunch of ambiguous function references during compilation.

Here is patch that fixes the configure issue:

From 439ccdc4d53d39a4127e76fec9e1679ada88fc2c Mon Sep 17 00:00:00 2001
From: Petros Angelatos <petrosagg@gmail.com>
Date: Sat, 2 Jun 2018 22:55:59 -0700
Subject: [PATCH] fix perl error during configure

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 6a42542..8e596ea 100755
--- a/configure
+++ b/configure
@@ -34,7 +34,7 @@ while (my $arg = shift) {
 # The first step is to create a temporary file name using the method
 # from PerlFAQ.
 use IO::File;
-use POSIX qw(tmpnam);
+use File::Temp qw/ :POSIX /;
 my $name;
 do {
   $name = tmpnam();
-- 
2.17.1

And a patch that fixes the compilation errors:

From ca48335954f042d2d2cb171e673165a14140760e Mon Sep 17 00:00:00 2001
From: Petros Angelatos <petrosagg@gmail.com>
Date: Sat, 2 Jun 2018 23:04:45 -0700
Subject: [PATCH] fix errors with ambiguous references to functions

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
---
 src/instance.cc |  4 +--
 src/library.cc  | 70 ++++++++++++++++++++++++-------------------------
 src/symbol.cc   |  8 +++---
 3 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/src/instance.cc b/src/instance.cc
index c1be534..b4ec404 100644
--- a/src/instance.cc
+++ b/src/instance.cc
@@ -362,9 +362,9 @@ unsigned long HashSet::FindIndex(Instance *key, unsigned long mask)
   else
     table = items;

-  ind1 = hash((char *)key, arity*4, SEED_1) % mask;
+  ind1 = ::hash((char *)key, arity*4, SEED_1) % mask;
   if (table[ind1] && !equal_item(key, table[ind1], arity))
-    ind2 = (hash((char *)key, arity*4, SEED_2) % mask) + 1;
+    ind2 = (::hash((char *)key, arity*4, SEED_2) % mask) + 1;
   else
     return ind1;

diff --git a/src/library.cc b/src/library.cc
index 281d017..c0512c3 100644
--- a/src/library.cc
+++ b/src/library.cc
@@ -164,7 +164,7 @@ long int_plus(int nargs, long *args )

   for (i=0; i < nargs; i++) {
     if (IS_CONSTANT(args[i])) 
-      runtime_error(FUN_PLUS, ERR_ARGUMENT, args[i]);
+      ::runtime_error(FUN_PLUS, ERR_ARGUMENT, args[i]);

     result += args[i];
   }
@@ -175,25 +175,25 @@ long int_plus(int nargs, long *args )
 long int_exp(int nargs, long *args )
 {
   if (nargs != 2) {
-    runtime_error(FUN_EXP, ERR_NUMARGS, 2);
+    ::runtime_error(FUN_EXP, ERR_NUMARGS, 2);
   }
   long base = args[0];
   long power = args[1];
   long result = 1;

   if (IS_CONSTANT(args[0])) 
-    runtime_error(FUN_EXP, ERR_ARGUMENT, args[0]);
+    ::runtime_error(FUN_EXP, ERR_ARGUMENT, args[0]);

   if (IS_CONSTANT(args[1])) 
-    runtime_error(FUN_EXP, ERR_ARGUMENT, args[1]);
+    ::runtime_error(FUN_EXP, ERR_ARGUMENT, args[1]);

   if (power < 0)
-    runtime_error(FUN_EXP, ERR_ARGUMENT, args[1]);
+    ::runtime_error(FUN_EXP, ERR_ARGUMENT, args[1]);

   while (power--) {
     result *= base;
     if (IS_CONSTANT(result))
-      runtime_error(FUN_EXP, ERR_OVERFLOW, 0);
+      ::runtime_error(FUN_EXP, ERR_OVERFLOW, 0);
   }
   return result;
 }
@@ -201,16 +201,16 @@ long int_exp(int nargs, long *args )
 long int_norm(int nargs, long *args)
 {
   if (nargs != 1) {
-    runtime_error(FUN_NORM, ERR_NUMARGS, 1);
+    ::runtime_error(FUN_NORM, ERR_NUMARGS, 1);
   }

   if (args[0] < 0 || args[0] > predicate_table->Size())
-    runtime_error(FUN_NORM, ERR_RANGE, args[0]);
+    ::runtime_error(FUN_NORM, ERR_RANGE, args[0]);

   long p = args[0];

   if (!predicates[p]->DomainPredicate())
-    runtime_error(FUN_NORM, ERR_NONFIXED_EXTENSION, args[0]);
+    ::runtime_error(FUN_NORM, ERR_NONFIXED_EXTENSION, args[0]);

   if (predicates[p]->atoms)
     return predicates[p]->atoms->Size();
@@ -258,11 +258,11 @@ long int_minus(int nargs, long *args)
   result = args[0];

   if (IS_CONSTANT(result)) 
-    runtime_error(FUN_MINUS, ERR_ARGUMENT, args[i]);
+    ::runtime_error(FUN_MINUS, ERR_ARGUMENT, args[i]);

   for (i = 1; i < nargs; i++) { // '1' intentional
     if (IS_CONSTANT(args[i])) 
-      runtime_error(FUN_MINUS, ERR_ARGUMENT, args[i]);
+      ::runtime_error(FUN_MINUS, ERR_ARGUMENT, args[i]);

     result -= args[i];
   }
@@ -277,7 +277,7 @@ long int_abs(int, long *args)
   result = args[0];

   if (IS_CONSTANT(result)) 
-    runtime_error(FUN_ABS, ERR_ARGUMENT, result);
+    ::runtime_error(FUN_ABS, ERR_ARGUMENT, result);


   if (result < 0)
@@ -300,7 +300,7 @@ long int_le(int nargs, long *args)

   for (i = 1 ; i < nargs; i++ ) { // '1' intentional
     if (IS_CONSTANT(args[i]))
-      runtime_error(FUN_LE, ERR_INVALID_COMPARE, args[0], args[i]);
+      ::runtime_error(FUN_LE, ERR_INVALID_COMPARE, args[0], args[i]);

     if (args[i] < prior_value) {
       result = 0;
@@ -324,7 +324,7 @@ long int_ge(int nargs, long *args)

   for (i = 1 ; i < nargs; i++ ) { // '1' intentional
     if (IS_CONSTANT(args[i]))
-      runtime_error(FUN_GE, ERR_INVALID_COMPARE, args[0],args[i]);
+      ::runtime_error(FUN_GE, ERR_INVALID_COMPARE, args[0],args[i]);


     if (args[i] > prior_value) {
@@ -349,7 +349,7 @@ long int_gt(int nargs, long *args)

   for (i = 1 ; i < nargs; i++ ) { // '1' intentional
     if (IS_CONSTANT(args[i]))
-      runtime_error(FUN_GT, ERR_INVALID_COMPARE, args[0],args[i]);
+      ::runtime_error(FUN_GT, ERR_INVALID_COMPARE, args[0],args[i]);

     if (args[i] >= prior_value) {
       result = 0;
@@ -373,7 +373,7 @@ long int_lt(int nargs, long *args)

   for (i = 1 ; i < nargs; i++ ) { // '1' intentional
     if (IS_CONSTANT(args[i]))
-      runtime_error(FUN_LT, ERR_INVALID_COMPARE, args[0], args[i]);
+      ::runtime_error(FUN_LT, ERR_INVALID_COMPARE, args[0], args[i]);

     if (args[i] <= prior_value) {
       result = 0;
@@ -408,11 +408,11 @@ long int_times(int nargs, long *args)
   int i = 0;

   if (IS_CONSTANT(result)) 
-    runtime_error(FUN_TIMES, ERR_ARGUMENT, args[i]);
+    ::runtime_error(FUN_TIMES, ERR_ARGUMENT, args[i]);

   for (i = 0; i < nargs; i++) {
     if (IS_CONSTANT(args[i])) 
-      runtime_error(FUN_TIMES, ERR_ARGUMENT, args[i]);
+      ::runtime_error(FUN_TIMES, ERR_ARGUMENT, args[i]);

     result *= args[i];
   }
@@ -425,14 +425,14 @@ long int_div(int nargs, long *args)
   int i = 0;

   if (IS_CONSTANT(result)) 
-    runtime_error(FUN_DIV, ERR_ARGUMENT, args[i]);
+    ::runtime_error(FUN_DIV, ERR_ARGUMENT, args[i]);

   for (i = 1; i < nargs; i++) { // '1' intentional
     if (IS_CONSTANT(args[i])) 
-      runtime_error(FUN_DIV,ERR_ARGUMENT, args[i]);
+      ::runtime_error(FUN_DIV,ERR_ARGUMENT, args[i]);

     if (args[i] == 0) {
-      runtime_error(FUN_DIV,ERR_DIVIDE_BY_ZERO, 0); 
+      ::runtime_error(FUN_DIV,ERR_DIVIDE_BY_ZERO, 0); 
     } else {
       result /= args[i];
     }
@@ -446,14 +446,14 @@ long int_mod(int nargs, long *args)
   int i = 0;

   if (IS_CONSTANT(result)) 
-    runtime_error(FUN_MOD, ERR_ARGUMENT, args[i]);
+    ::runtime_error(FUN_MOD, ERR_ARGUMENT, args[i]);

   for (i = 1; i < nargs; i++) { // '1' intentional
     if (IS_CONSTANT(args[i])) 
-      runtime_error(FUN_MOD, ERR_ARGUMENT, args[i]);
+      ::runtime_error(FUN_MOD, ERR_ARGUMENT, args[i]);

     if (args[i] == 0) {
-      runtime_error(FUN_MOD, ERR_DIVIDE_BY_ZERO, 0); 
+      ::runtime_error(FUN_MOD, ERR_DIVIDE_BY_ZERO, 0); 
     } else {
       result %= args[i];
       if (result < 0)
@@ -469,11 +469,11 @@ long int_and(int nargs, long *args)
   int i = 0;

   if (IS_CONSTANT(result)) 
-    runtime_error(FUN_AND, ERR_ARGUMENT, args[i]);
+    ::runtime_error(FUN_AND, ERR_ARGUMENT, args[i]);

   for (i = 1; i < nargs; i++) { // '1' intentional
     if (IS_CONSTANT(args[i])) 
-      runtime_error(FUN_AND, ERR_ARGUMENT, args[i]);
+      ::runtime_error(FUN_AND, ERR_ARGUMENT, args[i]);

     result &= args[i];
   }
@@ -486,11 +486,11 @@ long int_or(int nargs, long *args)
   int i = 0;

   if (IS_CONSTANT(result)) 
-    runtime_error(FUN_OR, ERR_ARGUMENT, args[i]);
+    ::runtime_error(FUN_OR, ERR_ARGUMENT, args[i]);

   for (i = 1; i < nargs; i++) { // '1' intentional
     if (IS_CONSTANT(args[i])) 
-      runtime_error(FUN_OR, ERR_ARGUMENT, args[i]);
+      ::runtime_error(FUN_OR, ERR_ARGUMENT, args[i]);

     result |= args[i];
   }
@@ -503,11 +503,11 @@ long int_xor(int nargs, long *args)
   int i = 0;

   if (IS_CONSTANT(result)) 
-    runtime_error(FUN_XOR, ERR_ARGUMENT, args[i]);
+    ::runtime_error(FUN_XOR, ERR_ARGUMENT, args[i]);

   for (i = 1; i < nargs; i++) { // '1' intentional
     if (IS_CONSTANT(args[i])) 
-      runtime_error(FUN_XOR, ERR_ARGUMENT, args[i]);
+      ::runtime_error(FUN_XOR, ERR_ARGUMENT, args[i]);

     result ^= args[i];
   }
@@ -520,7 +520,7 @@ long int_not(int, long *args)
   long result = args[0];

   if (IS_CONSTANT(result)) 
-    runtime_error(FUN_NOT, ERR_ARGUMENT, result);
+    ::runtime_error(FUN_NOT, ERR_ARGUMENT, result);

   result = ~result;
   return result;
@@ -540,7 +540,7 @@ long lt_string(int nargs, long *args)
   for (int i = 1; i < nargs; i++) {
     second = constant_table->LookupByValue(args[i]);
     if (!second)
-      runtime_error(FUN_LT, ERR_INVALID_COMPARE, args[0], args[i]);
+      ::runtime_error(FUN_LT, ERR_INVALID_COMPARE, args[0], args[i]);

     if (strcmp(first, second) >= 0) {
       result = 0;
@@ -564,7 +564,7 @@ long le_string(int nargs, long *args)
   for (int i = 1; i < nargs; i++) {
     second = constant_table->LookupByValue(args[i]);
     if (!second)
-      runtime_error(FUN_LE, ERR_INVALID_COMPARE,args[0], args[i]);
+      ::runtime_error(FUN_LE, ERR_INVALID_COMPARE,args[0], args[i]);

     if (strcmp(first, second) > 0) {
       result = 0;
@@ -589,7 +589,7 @@ long gt_string(int nargs, long *args)
   for (int i = 1; i < nargs; i++) {
     second = constant_table->LookupByValue(args[i]);
     if (!second)
-      runtime_error(FUN_GT, ERR_INVALID_COMPARE, args[0],args[i]);
+      ::runtime_error(FUN_GT, ERR_INVALID_COMPARE, args[0],args[i]);

     if (strcmp(first, second) <= 0) {
       result = 0;
@@ -614,7 +614,7 @@ long ge_string(int nargs, long *args)
   for (int i = 1; i < nargs; i++) {
     second = constant_table->LookupByValue(args[i]);
     if (!second)
-      runtime_error(FUN_GE, ERR_INVALID_COMPARE,args[0], args[i]);
+      ::runtime_error(FUN_GE, ERR_INVALID_COMPARE,args[0], args[i]);

     if (strcmp(first, second) < 0) {
       result = 0;
diff --git a/src/symbol.cc b/src/symbol.cc
index 6ea455d..1fc1b18 100644
--- a/src/symbol.cc
+++ b/src/symbol.cc
@@ -127,9 +127,9 @@ unsigned long SymbolTable::FindIndex(const char *key, long mask)
   else
     table = items;

-  ind1 = hash(key, strlen(key), SEED_1) % mask;
+  ind1 = ::hash(key, strlen(key), SEED_1) % mask;
   if (table[ind1] && strcmp(key, table[ind1]->symbol))
-    ind2 = (hash(key, strlen(key), SEED_2) % mask) + 1;
+    ind2 = (::hash(key, strlen(key), SEED_2) % mask) + 1;
   else 
     return ind1;

@@ -398,9 +398,9 @@ unsigned long FunctionTable::FindIndex(const char *key, long mask)
   else
     table = items;

-  ind1 = hash(key, strlen(key), SEED_1) % mask;
+  ind1 = ::hash(key, strlen(key), SEED_1) % mask;
   if (table[ind1] && strcmp(key, table[ind1]->symbol))
-    ind2 = (hash(key, strlen(key), SEED_2) % mask) + 1;
+    ind2 = (::hash(key, strlen(key), SEED_2) % mask) + 1;
   else
     return ind1;

-- 
2.17.1