Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Mar 2014 18:06:29 GMT
From:      S Ayrgon <sayrgon@hotmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/188055: devel/xc3sprog fails to compile
Message-ID:  <201403291806.s2TI6TLP002382@cgiserv.freebsd.org>
Resent-Message-ID: <201403291810.s2TIA0S2044880@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         188055
>Category:       ports
>Synopsis:       devel/xc3sprog fails to compile
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 29 18:10:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     S Ayrgon
>Release:        10.0
>Organization:
-
>Environment:
FreeBSD Des 10.0-STABLE FreeBSD 10.0-STABLE #0 r262690: Sun Mar  2 20:43:51 CET 2014     root@Des:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
devel/xc3sprog fails to compile

# make
===>   xc3sprog-r449_1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by xc3sprog-r449_1 for building
===>  Extracting for xc3sprog-r449_1
=> SHA256 Checksum OK for xc3sprog-r449.tar.gz.
===>  Patching for xc3sprog-r449_1
===>   xc3sprog-r449_1 depends on file: /usr/local/bin/cmake - found
===>   xc3sprog-r449_1 depends on shared library: ftdi - found
===>  Configuring for xc3sprog-r449_1
===>  Performing in-source build
/bin/mkdir -p /usr/ports/devel/xc3sprog/work/xc3sprog-r449
-- The C compiler identification is Clang 3.3.0
-- The CXX compiler identification is Clang 3.3.0
-- Check for working C compiler: /usr/local/libexec/ccache/world/cc
-- Check for working C compiler: /usr/local/libexec/ccache/world/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.28") 
-- checking for module 'libftdi'
--   found libftdi, version 0.20
-- Found LIBFTDI: /usr/local/lib/libftdi.so  
-- Could NOT find Subversion (missing:  Subversion_SVN_EXECUTABLE) 
-- checking for module 'libusb'
--   package 'libusb' not found
-- Found LIBUSB: /usr/lib/libusb.so  
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_CXX_FLAGS_DEBUG
    CMAKE_C_FLAGS_DEBUG
    CMAKE_C_FLAGS_RELEASE
    CMAKE_MODULE_LINKER_FLAGS
    CMAKE_SHARED_LINKER_FLAGS
    THREADS_HAVE_PTHREAD_ARG


-- Build files have been written to: /usr/ports/devel/xc3sprog/work/xc3sprog-r449
===>  Building for xc3sprog-r449_1
[  4%] Generating config.h
Scanning dependencies of target xc3sproglib
[ 26%] Building CXX object CMakeFiles/xc3sproglib.dir/jedecfile.cpp.o
[ 17%] Building CXX object CMakeFiles/xc3sproglib.dir/ioftdi.cpp.o
[ 34%] Building CXX object CMakeFiles/xc3sproglib.dir/iobase.cpp.o
[ 13%] Building CXX object CMakeFiles/xc3sproglib.dir/jtag.cpp.o
[ 26%] Building CXX object CMakeFiles/xc3sproglib.dir/ioparport.cpp.o
[ 39%] Building CXX object CMakeFiles/xc3sproglib.dir/progalgxc95x.cpp.o
[ 34%] Building CXX object CMakeFiles/xc3sproglib.dir/bitfile.cpp.o
[ 13%] Building CXX object CMakeFiles/xc3sproglib.dir/iofx2.cpp.o
/usr/ports/devel/xc3sprog/work/xc3sprog-r449/iobase.cpp:36:17: warning: using directive refers to implicitly-defined namespace 'std'
using namespace std;
                ^
1 warning generated.
[ 43%] Building CXX object CMakeFiles/xc3sproglib.dir/utilities.cpp.o
/usr/ports/devel/xc3sprog/work/xc3sprog-r449/jedecfile.cpp:437:7: error: unknown type name 'time_t'
      time_t t;
      ^
/usr/ports/devel/xc3sprog/work/xc3sprog-r449/jedecfile.cpp:440:11: error: use of undeclared identifier 'time'
      t = time(NULL);
          ^
/usr/ports/devel/xc3sprog/work/xc3sprog-r449/jedecfile.cpp:444:8: error: use of undeclared identifier 'strftime'
          if (strftime(outstr, sizeof(outstr), "%a %b %d %T %Y", tmp))
              ^
In file included from /usr/ports/devel/xc3sprog/work/xc3sprog-r449/jedecfile.cpp:29:
/usr/ports/devel/xc3sprog/work/xc3sprog-r449/jedecfile.h:56:8: warning: private field 'Error' is not used [-Wunused-private-field]
  bool Error;
       ^
/usr/ports/devel/xc3sprog/work/xc3sprog-r449/jedecfile.h:58:9: warning: private field 'logfile' is not used [-Wunused-private-field]
  FILE *logfile;
        ^
2 warnings and 3 errors generated.
--- CMakeFiles/xc3sproglib.dir/jedecfile.cpp.o ---
*** [CMakeFiles/xc3sproglib.dir/jedecfile.cpp.o] Error code 1

make[4]: stopped in /usr/ports/devel/xc3sprog/work/xc3sprog-r449
/usr/ports/devel/xc3sprog/work/xc3sprog-r449/ioftdi.cpp:41:17: error: use of undeclared identifier 'getenv'
  char *fname = getenv("FTDI_DEBUG");
                ^
1 error generated.
--- CMakeFiles/xc3sproglib.dir/ioftdi.cpp.o ---

*** [CMakeFiles/xc3sproglib.dir/ioftdi.cpp.o] Error code 1

make[4]: stopped in /usr/ports/devel/xc3sprog/work/xc3sprog-r449
2 errors

make[4]: stopped in /usr/ports/devel/xc3sprog/work/xc3sprog-r449
--- CMakeFiles/xc3sproglib.dir/all ---
*** [CMakeFiles/xc3sproglib.dir/all] Error code 2

make[3]: stopped in /usr/ports/devel/xc3sprog/work/xc3sprog-r449
1 error

make[3]: stopped in /usr/ports/devel/xc3sprog/work/xc3sprog-r449
--- CMakeFiles/xc3sprog.dir/rule ---
*** [CMakeFiles/xc3sprog.dir/rule] Error code 2

make[2]: stopped in /usr/ports/devel/xc3sprog/work/xc3sprog-r449
1 error

make[2]: stopped in /usr/ports/devel/xc3sprog/work/xc3sprog-r449
--- xc3sprog ---
*** [xc3sprog] Error code 2

make[1]: stopped in /usr/ports/devel/xc3sprog/work/xc3sprog-r449
1 error

make[1]: stopped in /usr/ports/devel/xc3sprog/work/xc3sprog-r449
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/xc3sprog

>How-To-Repeat:
cd /usr/ports/devel/xc3sprog && make


>Fix:
edit ioftdi.cpp and jedecfile.cpp as shown below:


 # diff -ur xc3sprog-r449.old/ xc3sprog-r449/
diff -ur xc3sprog-r449.old/ioftdi.cpp xc3sprog-r449/ioftdi.cpp
--- xc3sprog-r449.old/ioftdi.cpp        2014-03-29 18:50:39.000000000 +0100
+++ xc3sprog-r449/ioftdi.cpp    2014-03-29 18:52:32.000000000 +0100
@@ -23,6 +23,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <errno.h>
+#include <stdlib.h>
 
 #include "ioftdi.h"
 #include "io_exception.h"
diff -ur xc3sprog-r449.old/jedecfile.cpp xc3sprog-r449/jedecfile.cpp
--- xc3sprog-r449.old/jedecfile.cpp     2014-03-29 18:50:39.000000000 +0100
+++ xc3sprog-r449/jedecfile.cpp 2014-03-29 18:51:59.000000000 +0100
@@ -25,6 +25,7 @@
 #include <strings.h>
 #include <errno.h>
 #include <cstdio>
+#include <time.h>
 
 #include "jedecfile.h"
 #include "io_exception.h"


I thank the maintainer for the help! 

Patch attached with submission follows:

diff -ur xc3sprog-r449.old/ioftdi.cpp xc3sprog-r449/ioftdi.cpp
--- xc3sprog-r449.old/ioftdi.cpp        2014-03-29 18:50:39.000000000 +0100
+++ xc3sprog-r449/ioftdi.cpp    2014-03-29 18:52:32.000000000 +0100
@@ -23,6 +23,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <errno.h>
+#include <stdlib.h>
 
 #include "ioftdi.h"
 #include "io_exception.h"
diff -ur xc3sprog-r449.old/jedecfile.cpp xc3sprog-r449/jedecfile.cpp
--- xc3sprog-r449.old/jedecfile.cpp     2014-03-29 18:50:39.000000000 +0100
+++ xc3sprog-r449/jedecfile.cpp 2014-03-29 18:51:59.000000000 +0100
@@ -25,6 +25,7 @@
 #include <strings.h>
 #include <errno.h>
 #include <cstdio>
+#include <time.h>
 
 #include "jedecfile.h"
 #include "io_exception.h"



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403291806.s2TI6TLP002382>