Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Failed on windows #7

Open
tesla1060 opened this issue Aug 26, 2013 · 40 comments
Open

Installation Failed on windows #7

tesla1060 opened this issue Aug 26, 2013 · 40 comments

Comments

@tesla1060
Copy link

Hi,
I have used pip install ad3 to install, I am receiving the below error,

C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C
4530: C++ exception handler used, but unwind semantics are not enabled. Specify   /EHsc

ad3/FactorGraph.cpp(21) : fatal error C1083: Cannot open include file: 'sys/time
.h': No such file or directory

error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' fa
iled with exit status 2

Is that because sys/time not in win32 ?

@andre-martins
Copy link
Owner

Hi,

Thanks for reporting that. I just committed a fix that I hope can solve
that problem. I don't have a windows machine at hand right now so I can't
test it right away, but if you are able to test please let me know if it
worked.

André

2013/8/26 tesla1060 [email protected]

Hi,
I have used pip install ad3 to install, I am receiving the below error,

C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C
4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc

ad3/FactorGraph.cpp(21) : fatal error C1083: Cannot open include file: 'sys/time
.h': No such file or directory

error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' fa
iled with exit status 2

Is that because sys/time not in win32 ?


Reply to this email directly or view it on GitHubhttps://github.com//issues/7
.

@tesla1060
Copy link
Author

Hi, I am not sure how to install this without pip. Do I download the source? But it seems the installation instruction requires make

@amueller
Copy link
Contributor

I just realized that installing is not completely trivial as we didn't merge our changes upstream to @andre-martins' repo.
Will do a pull-request for that.

@amueller
Copy link
Contributor

Ok, I pulled the changes in the pystruct repo.
@tesla1060 could you please try:
pip install https://github.com/pystruct/AD3/archive/master.zip

Thanks :)

@tesla1060
Copy link
Author

There is a new error

C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W
3 /GS- /DNDEBUG -I. -I./ad3 -I./Eigen /Tpad3/FactorGraph.cpp /Fobuild\temp.win32
-2.7\ad3/FactorGraph.obj

FactorGraph.cpp

C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C
4530: C++ exception handler used, but unwind semantics are not enabled. Specify
/EHsc

ad3/FactorGraph.cpp(22) : fatal error C1083: Cannot open include file: 'gettimeo
fday.h': No such file or directory

error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' fa
iled with exit status 2

@andre-martins
Copy link
Owner

Just committed a fix. Can you please update and try?

André

2013/8/27 tesla1060 [email protected]

There is a new error

C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W
3 /GS- /DNDEBUG -I. -I./ad3 -I./Eigen /Tpad3/FactorGraph.cpp /Fobuild\temp.win32
-2.7\ad3/FactorGraph.obj

FactorGraph.cpp

C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C
4530: C++ exception handler used, but unwind semantics are not enabled. Specify
/EHsc

ad3/FactorGraph.cpp(22) : fatal error C1083: Cannot open include file: 'gettimeo
fday.h': No such file or directory

error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' fa
iled with exit status 2


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-23307031
.

@tesla1060
Copy link
Author

Hi do I still use
pip install https://github.com/pystruct/AD3/archive/master.zip

If yes, the same error message still show.

@andre-martins
Copy link
Owner

Did you run git pull and deleted all the object files? You shouldn't get
that error message, because I removed

-#include <gettimeofday.h>

so the code is not trying to include that header file anymore...

André

2013/8/27 tesla1060 [email protected]

Hi do I still use
pip install https://github.com/pystruct/AD3/archive/master.zip

If yes, the same error message still show.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-23329201
.

@tesla1060
Copy link
Author

err, sorry, I am not sure how install from the source in Windows.

@amueller
Copy link
Contributor

Please do
pip install https://github.com/andre-martins/AD3/archive/master.zip

@andre-martins: that fetches the current master branch as zip and runs python setup.py install
The command that @tesla1060 ran still pointed to the pystruct version that didn't have your commit.

@tesla1060
Copy link
Author

well, I am still getting the same error here

pip install https://github.com/andre-martins/AD3/archive/master.zip

C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W
3 /GS- /DNDEBUG -I. -I./ad3 -I./Eigen /Tpad3/FactorGraph.cpp /Fobuild\temp.win32
-2.7\ad3/FactorGraph.obj

FactorGraph.cpp

C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C
4530: C++ exception handler used, but unwind semantics are not enabled. Specify
/EHsc

ad3/FactorGraph.cpp(22) : fatal error C1083: Cannot open include file: 'gettimeo
fday.h': No such file or directory

error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' fa
iled with exit status 2

@amueller
Copy link
Contributor

The line is actually still there @andre-martins.

@andre-martins
Copy link
Owner

Sorry, my bad... Just removed that line and committed a new version. Let me
know if it works now.

André

2013/8/27 tesla1060 [email protected]

well, I am still getting the same error here

pip install https://github.com/andre-martins/AD3/archive/master.zip

C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W
3 /GS- /DNDEBUG -I. -I./ad3 -I./Eigen /Tpad3/FactorGraph.cpp /Fobuild\temp.win32
-2.7\ad3/FactorGraph.obj

FactorGraph.cpp

C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C
4530: C++ exception handler used, but unwind semantics are not enabled. Specify
/EHsc

ad3/FactorGraph.cpp(22) : fatal error C1083: Cannot open include file: 'gettimeo
fday.h': No such file or directory

error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' fa
iled with exit status 2


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-23332417
.

@tesla1060
Copy link
Author

OK. that error is gone, but here is a new one though,

ad3/GenericFactor.cpp(200) : error C2668: 'sqrt' : ambiguous call to overloaded
function

C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(581): cou
ld be 'long double sqrt(long double)'

    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(533): or
  'float sqrt(float)'

    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(128): or
  'double sqrt(double)'

    while trying to match the argument list '(unsigned int)'

@andre-martins
Copy link
Owner

Fixed. Can you try again?

2013/8/27 tesla1060 [email protected]

OK. that error is gone, but here is a new one though,

ad3/GenericFactor.cpp(200) : error C2668: 'sqrt' : ambiguous call to overloaded
function

C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(581): cou
ld be 'long double sqrt(long double)'

C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(533): or

'float sqrt(float)'

C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(128): or

'double sqrt(double)'

while trying to match the argument list '(unsigned int)'


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-23333271
.

@tesla1060
Copy link
Author

That one is gone, but more emerged...

C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C
4530: C++ exception handler used, but unwind semantics are not enabled. Specify
/EHsc

ad3/Utils.cpp(41) : error C2065: 'FILETIME' : undeclared identifier

ad3/Utils.cpp(41) : error C2146: syntax error : missing ';' before identifier 'f
t'

ad3/Utils.cpp(41) : error C2065: 'ft' : undeclared identifier

ad3/Utils.cpp(47) : error C2065: 'ft' : undeclared identifier

ad3/Utils.cpp(47) : error C3861: 'GetSystemTimeAsFileTime': identifier not found


ad3/Utils.cpp(49) : error C2065: 'ft' : undeclared identifier

ad3/Utils.cpp(49) : error C2228: left of '.dwHighDateTime' must have class/struc
t/union

    type is ''unknown-type''

ad3/Utils.cpp(51) : error C2065: 'ft' : undeclared identifier

ad3/Utils.cpp(51) : error C2228: left of '.dwLowDateTime' must have class/struct
/union

    type is ''unknown-type''

error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' fa
iled with exit status 2

@andre-martins
Copy link
Owner

Can you try to uncomment line 26 in Utils.cpp?

//#include <windows.h> //I've ommited this line.

If it works, I'll commit the change.

André

2013/8/27 tesla1060 [email protected]

That one is gone, but more emerged...

C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C
4530: C++ exception handler used, but unwind semantics are not enabled. Specify
/EHsc

ad3/Utils.cpp(41) : error C2065: 'FILETIME' : undeclared identifier

ad3/Utils.cpp(41) : error C2146: syntax error : missing ';' before identifier 'f
t'

ad3/Utils.cpp(41) : error C2065: 'ft' : undeclared identifier

ad3/Utils.cpp(47) : error C2065: 'ft' : undeclared identifier

ad3/Utils.cpp(47) : error C3861: 'GetSystemTimeAsFileTime': identifier not found

ad3/Utils.cpp(49) : error C2065: 'ft' : undeclared identifier

ad3/Utils.cpp(49) : error C2228: left of '.dwHighDateTime' must have class/struc
t/union

type is ''unknown-type''

ad3/Utils.cpp(51) : error C2065: 'ft' : undeclared identifier

ad3/Utils.cpp(51) : error C2228: left of '.dwLowDateTime' must have class/struct
/union

type is ''unknown-type''

error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' fa
iled with exit status 2


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-23336855
.

@tesla1060
Copy link
Author

No, a lot more errors

C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W
3 /GS- /DNDEBUG -I. -I./ad3 -I./Eigen /Tpad3/Utils.cpp /Fobuild\temp.win32-2.7\a
d3/Utils.obj

Utils.cpp

C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C
4530: C++ exception handler used, but unwind semantics are not enabled. Specify
/EHsc

C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock.h(111) : error C20
11: 'AD3::timeval' : 'struct' type redefinition

    c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(56) : error C2027: use of undefined type 'AD3::timeval'

    c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(56) : error C2227: left of '->tv_sec' must point to class/struct/u
nion/generic type

ad3/Utils.cpp(57) : error C2027: use of undefined type 'AD3::timeval'

    c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(57) : error C2227: left of '->tv_usec' must point to class/struct/
union/generic type

ad3/Utils.cpp(76) : error C2027: use of undefined type 'AD3::timeval'

    c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(76) : error C2228: left of '.tv_sec' must have class/struct/union

ad3/Utils.cpp(76) : error C2027: use of undefined type 'AD3::timeval'

    c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(76) : error C2228: left of '.tv_sec' must have class/struct/union

ad3/Utils.cpp(77) : error C2027: use of undefined type 'AD3::timeval'

    c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(77) : error C2228: left of '.tv_usec' must have class/struct/union

ad3/Utils.cpp(77) : error C2027: use of undefined type 'AD3::timeval'

    c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(77) : error C2228: left of '.tv_usec' must have class/struct/union

ad3/Utils.cpp(81) : error C2027: use of undefined type 'AD3::timeval'

    c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(81) : error C2228: left of '.tv_sec' must have class/struct/union

ad3/Utils.cpp(81) : error C2027: use of undefined type 'AD3::timeval'

    c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(81) : error C2228: left of '.tv_sec' must have class/struct/union

ad3/Utils.cpp(82) : error C2027: use of undefined type 'AD3::timeval'

    c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(82) : error C2228: left of '.tv_usec' must have class/struct/union

ad3/Utils.cpp(82) : error C2027: use of undefined type 'AD3::timeval'

    c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(82) : error C2228: left of '.tv_usec' must have class/struct/union

error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' fa
iled with exit status 2

@andre-martins
Copy link
Owner

OK. I finally got to try this in a Windows machine and made it to at least
generate Utils.obj. I didn't try a full compilation, but I think it should
work now with the latest commit. Can you please try? Thanks.

2013/8/28 tesla1060 [email protected]

No, a lot more errors

C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox
/MD /W
3 /GS- /DNDEBUG -I. -I./ad3 -I./Eigen /Tpad3/Utils.cpp
/Fobuild\temp.win32-2.7\a
d3/Utils.obj

Utils.cpp

C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) :
warning C
4530: C++ exception handler used, but unwind semantics are not enabled.
Specify
/EHsc

C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winsock.h(111) :
error C20
11: 'AD3::timeval' : 'struct' type redefinition

c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(56) : error C2027: use of undefined type 'AD3::timeval'

c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(56) : error C2227: left of '->tv_sec' must point to
class/struct/u
nion/generic type

ad3/Utils.cpp(57) : error C2027: use of undefined type 'AD3::timeval'

c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(57) : error C2227: left of '->tv_usec' must point to
class/struct/
union/generic type

ad3/Utils.cpp(76) : error C2027: use of undefined type 'AD3::timeval'

c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(76) : error C2228: left of '.tv_sec' must have
class/struct/union

ad3/Utils.cpp(76) : error C2027: use of undefined type 'AD3::timeval'

c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(76) : error C2228: left of '.tv_sec' must have
class/struct/union

ad3/Utils.cpp(77) : error C2027: use of undefined type 'AD3::timeval'

c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(77) : error C2228: left of '.tv_usec' must have
class/struct/union

ad3/Utils.cpp(77) : error C2027: use of undefined type 'AD3::timeval'

c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(77) : error C2228: left of '.tv_usec' must have
class/struct/union

ad3/Utils.cpp(81) : error C2027: use of undefined type 'AD3::timeval'

c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(81) : error C2228: left of '.tv_sec' must have
class/struct/union

ad3/Utils.cpp(81) : error C2027: use of undefined type 'AD3::timeval'

c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(81) : error C2228: left of '.tv_sec' must have
class/struct/union

ad3/Utils.cpp(82) : error C2027: use of undefined type 'AD3::timeval'

c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(82) : error C2228: left of '.tv_usec' must have
class/struct/union

ad3/Utils.cpp(82) : error C2027: use of undefined type 'AD3::timeval'

c:\users\shuo\appdata\local\temp\pip-fpur5d-build\ad3\Utils.h(46) : see

declaration of 'AD3::timeval'

ad3/Utils.cpp(82) : error C2228: left of '.tv_usec' must have
class/struct/union

error: command '"C:\Program Files\Microsoft Visual Studio
9.0\VC\BIN\cl.exe"' fa
iled with exit status 2

Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-23384621
.

@tesla1060
Copy link
Author

OK, i can install now, thanks!

@andre-martins
Copy link
Owner

Great! :-)

2013/8/28 tesla1060 [email protected]

OK, i can install now, thanks!


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-23410873
.

@klonuo
Copy link

klonuo commented Sep 23, 2014

Hi,

can someone write a simple and clear readme how to compile on Windows?

Cloning and running setup.py build errors:

...
c:\src\ad3\ad3\factor.h(415) : error C4716: 'AD3::FactorBUDGET::AddEvidence' : must return a value
c:\src\ad3\ad3\factor.h(466) : error C4716: 'AD3::FactorKNAPSACK::AddEvidence' : must return a value
error: command 'C:\\Program Files\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2

After reading README install instruction it seemed that maybe I should run make first:

$ make
cd ad3 && make
make[1]: Entering directory `/c/src/AD3/ad3'
g++ -O3 -Wall -Wno-sign-compare -c -fmessage-length=0 -I./ad3/ -I../Eigen -fPIC FactorGraph.cpp
FactorGraph.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
 // Copyright (c) 2012 Andre Martins
 ^
In file included from FactorGraph.cpp:22:0:
Utils.h:34:8: error: redefinition of 'struct timeval'
 struct timeval {
        ^
In file included from c:\mingw\include\windows.h:98:0,
                 from Utils.h:32,
                 from FactorGraph.cpp:22:
c:\mingw\include\winsock2.h:109:8: error: previous definition of 'struct timeval'
 struct timeval {
        ^
FactorGraph.cpp: In member function 'void AD3::FactorGraph::ConvertToBinaryFactorGraph(AD3::FactorGraph*)':
FactorGraph.cpp:91:26: warning: unused variable 'multi_variable' [-Wunused-variable]
           MultiVariable *multi_variable = factor_dense->GetMultiVariable(j);
                          ^
FactorGraph.cpp: In member function 'int AD3::FactorGraph::RunBranchAndBound(double, std::vector<bool>&, int, std::vector<double>*, std::vector<double>*, double*, double*, double*)':
FactorGraph.cpp:774:10: warning: unused variable 'upper_bound_zero' [-Wunused-variable]
   double upper_bound_zero;
          ^
FactorGraph.cpp:797:10: warning: unused variable 'upper_bound_one' [-Wunused-variable]
   double upper_bound_one;
          ^
make[1]: *** [FactorGraph.o] Error 1
make[1]: Leaving directory `/c/src/AD3/ad3'
make: *** [libad3] Error 2

?

@andre-martins
Copy link
Owner

Hi klonuo,

I just fixed the "must return a value" errors. Can you pull the new version
and try running setup.py again?

I think you shouldn't need to run make (that is an old README and I should
remove it from the repo, the right README is ad3/python/README.md.)

Let me know if it worked (I don't have a Windows machine at hand right now).

André

2014-09-23 10:27 GMT+01:00 klonuo [email protected]:

Hi,

can someone write a simple and clear readme how to compile on Windows?

Cloning and running setup.py build errors:

...
c:\src\ad3\ad3\factor.h(415) : error C4716: 'AD3::FactorBUDGET::AddEvidence' : must return a value
c:\src\ad3\ad3\factor.h(466) : error C4716: 'AD3::FactorKNAPSACK::AddEvidence' : must return a value
error: command 'C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe' failed with exit status 2

After reading README install instruction it seemed that maybe I should run
make first:

$ make
cd ad3 && make
make[1]: Entering directory /c/src/AD3/ad3' g++ -O3 -Wall -Wno-sign-compare -c -fmessage-length=0 -I./ad3/ -I../Eigen -fPIC FactorGraph.cpp FactorGraph.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default] // Copyright (c) 2012 Andre Martins ^ In file included from FactorGraph.cpp:22:0: Utils.h:34:8: error: redefinition of 'struct timeval' struct timeval { ^ In file included from c:\mingw\include\windows.h:98:0, from Utils.h:32, from FactorGraph.cpp:22: c:\mingw\include\winsock2.h:109:8: error: previous definition of 'struct timeval' struct timeval { ^ FactorGraph.cpp: In member function 'void AD3::FactorGraph::ConvertToBinaryFactorGraph(AD3::FactorGraph*)': FactorGraph.cpp:91:26: warning: unused variable 'multi_variable' [-Wunused-variable] MultiVariable *multi_variable = factor_dense->GetMultiVariable(j); ^ FactorGraph.cpp: In member function 'int AD3::FactorGraph::RunBranchAndBound(double, std::vector<bool>&, int, std::vector<double>*, std::vector<double>*, double*, double*, double*)': FactorGraph.cpp:774:10: warning: unused variable 'upper_bound_zero' [-Wunused-variable] double upper_bound_zero; ^ FactorGraph.cpp:797:10: warning: unused variable 'upper_bound_one' [-Wunused-variable] double upper_bound_one; ^ make[1]: *** [FactorGraph.o] Error 1 make[1]: Leaving directory/c/src/AD3/ad3'
make: *** [libad3] Error 2

?


Reply to this email directly or view it on GitHub
#7 (comment).

@klonuo
Copy link

klonuo commented Sep 23, 2014

Hi Andre,

I don't see any commit.
Can you post the diff, I'll make a patch?

@andre-martins
Copy link
Owner

My bad, I forgot to push. It's there now.

2014-09-23 12:15 GMT+01:00 klonuo [email protected]:

Hi Andre,

I don't see any commit.
Can you post the diff, I'll make a patch?


Reply to this email directly or view it on GitHub
#7 (comment).

@klonuo
Copy link

klonuo commented Sep 23, 2014

Thanks

It compiled fine now

Cheers

@amueller
Copy link
Contributor

amueller commented Dec 1, 2014

Sorry digging up this again, I now get

ad3/Utils.cpp:34:8:error redefinition of 'struct timezone'

previous definition in ``x86_64-w64-mingw32/include/time.h``

This is using mingw gcc as delivered by the anaconda package.

@smiranda
Copy link
Collaborator

smiranda commented Dec 2, 2014

EDIT: This comment has proven to be useless, since the difference was not in the source, but in the compiler configuration. See below.

I had this issue ; I no longer have this issue. I just compiled my vs project and it worked fine. However, I don't recall what I did to solve it. You may diff through my ad3 source files:

https://www.dropbox.com/s/gri3nmesqev40vy/win_friendly_ad3.zip?dl=0

If you can't find any difference, it means that the solution was somewhere in vsproject/os properties. If you do find a difference, it's probably that, since I didn't change anything else (I think).

Good luck.

@kiwitea
Copy link

kiwitea commented Jan 12, 2015

Have you guys managed to solve this?
I'm getting the same error:

ad3/Utils.cpp:34:8: error: redefinition of 'struct timezone'
 struct timezone
        ^
In file included from ad3/Utils.h:23:0,
                 from ad3/Utils.cpp:19:
C:/Program Files/TDM-GCC/x86_64-w64-mingw32/include/time.h:260:8: error: previous definition of 'struct timezone'
 struct timezone {
        ^

The diffs by smiranda showed only one change which doesn't seem to be relevant:

--- a/ad3/GenericFactor.cpp
+++ b/ad3/GenericFactor.cpp
@@ -20,7 +20,7 @@
 #include "Utils.h"
 #define EIGEN
 #ifdef EIGEN
-#include <../Eigen/Eigenvalues>
+#include <C:\Users\ssm\Documents\Visual Studio 2013\Projects\StaticAD3Lib\AD3Lib\Eigen\Eigenvalues>
 #else
 #include "lapacke/lapacke.h"
 #endif

I'm on Win8.1 64bit.

Cheers

@smiranda
Copy link
Collaborator

Hello again.

I just downloaded a clean master-branch from the repo and did the following steps in visual studio 2013:

  1. New Project Console Win32; Project Type (in the wizard) : Static Library.
  2. Right click the project ; Add Existing files; select the ad3 source files.
  3. You'll also have to add that eigen folder somewhere.
  4. Project Properties -> Configuration Properties -> C/C++ -> Preprocessor -> add "_CRT_SECURE_NO_WARNINGS" to PreprocessorDefinitions
  5. Build.

It works for me, Win8.1 64bit.

Hope this helps.

@eswears
Copy link

eswears commented Jun 8, 2015

Are there any solutions to the redefinition of 'struct timezone" error that amueller and kiwitea were seeing? I'm using pip install on Windows through Anaconda and I'm getting the same error:

"ad3/Utils.cpp:34:8: error: redefinition of 'struct timezone'
struct timezone
^
In file included from ad3/Utils.h:23:0,
from ad3/Utils.cpp:19:
C:/Program Files/TDM-GCC/x86_64-w64-mingw32/include/time.h:260:8: error: previous definition of 'struct timezone'
struct timezone {
"

Thanks,
Eran

@smiranda
Copy link
Collaborator

smiranda commented Jun 8, 2015

I got the python bindings to work by compiling ad3 with the microsoft c++ compiler, instead of gcc via mingw (which seems to be what you are using). I haven't installed through anaconda though. Can you tell it to use the microsoft compiler to build ad3 ?

@smiranda
Copy link
Collaborator

smiranda commented Jun 9, 2015

Ok. I got it to work on windows 8.1 x64 under MinGW.

This issue should be fixed in 1a08a99

@eswears
Copy link

eswears commented Jun 9, 2015

Great. I'll try it out today and let you know if it works.

Thanks.

@eswears
Copy link

eswears commented Jun 9, 2015

Your fixes solved the problem. Thank you.

-Eran

@robin-vjc
Copy link

I tried to pip install ad3 and got the following errors:

Collecting ad3
Using cached ad3-2.0.2.tar.gz
Building wheels for collected packages: ad3
Running setup.py bdist_wheel for ad3 ... error
Complete output from command C:\Miniconda2\python.exe -u -c "import setuptools, tokenize;file='c:\users\vujanicr\appdata\local\temp\pip-build-sbe4_m\ad3\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" bdist_wheel -d c:\users\vujanicr\appdata\local\temp\tmpmeougppip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\ad3
copying python\ad3\simple_inference.py -> build\lib.win-amd64-2.7\ad3
copying python\ad3__init__.py -> build\lib.win-amd64-2.7\ad3
running build_clib
building 'ad3' library
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\ad3
C:\Users\vujanicr\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I. -I./ad3 -I./Eigen /Tpad3/FactorGraph.cpp /Fobuild\temp.win-amd64-2.7\ad3/FactorGraph.obj
FactorGraph.cpp
C:\Users\vujanicr\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
ad3/FactorGraph.cpp(22) : fatal error C1083: Cannot open include file: 'gettimeofday.h': No such file or directory
error: command 'C:\Users\vujanicr\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe' failed with exit status

EDIT: I had to also manually pip install cython first. It now works if I do pip install https://github.com/andre-martins/AD3/archive/master.zip, (without having to do the manual changes detailed below), but pip install ad3 still gives the same error. It's bizzarre.

I solved the issue by reverting the changes above 1a08a99

Specifically, I reverted the three occurrences of change
#ifdef _WIN32 --> #if defined(_WIN32) && !defined(__MINGW32__)
in files ad3/Utils.cpp and ad3/Utils.h.

@garfieldnate
Copy link

pip install https://github.com/andre-martins/AD3/archive/master.zip worked for me. Windows 10, x64, Visual C++ 9.0.

@scramblingbalam
Copy link

Hi I've got the same problem,
Which is weird because I'm running a pretty similar system to >garfieldnate

Windows 10, x64
conda 4.3.14
python 2.7

I came across this when trying to use @amueller PyStruct
Which installs fine after I specify a version but then throws an error I traced to AD3

Is there a way to specify x64 machine?

This is the error:

Installing collected packages: ad3
Running setup.py install for ad3 ... error
Complete output from command C:\Users\scram\Anaconda2\python.exe -u -c "import setuptools, tokenize;file='c:\users\scram\appdata\local\temp\pip-nxpoek-build\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record c:\users\scram\appdata\local\temp\pip-3pcne5-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\ad3
copying python\ad3\simple_inference.py -> build\lib.win-amd64-2.7\ad3
copying python\ad3_init_.py -> build\lib.win-amd64-2.7\ad3
running build_clib
building 'ad3' library
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\ad3
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I. -I./ad3 -I./Eigen /Tpad3/FactorGraph.cpp /Fobuild\temp.win-amd64-2.7\ad3/FactorGraph.obj
FactorGraph.cpp
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\Factor.h(111) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\Factor.h(128) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\Factor.h(179) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\GenericFactor.h(62) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(43) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(66) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(70) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(92) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(111) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(129) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(142) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(173) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(184) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(193) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(203) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(207) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorGraph.h(42) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorGraph.h(45) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorGraph.h(48) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorGraph.h(204) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorGraph.h(228) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorGraph.h(270) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorGraph.h(301) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(30) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(51) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(65) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(129) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(162) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(188) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(207) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(251) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(265) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(320) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(336) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(365) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(420) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(445) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(471) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(477) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(537) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(545) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(602) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(605) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(612) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(645) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(659) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(663) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(748) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(774) : warning C4101: 'upper_bound_zero' : unreferenced local variable
ad3/FactorGraph.cpp(797) : warning C4101: 'upper_bound_one' : unreferenced local variable
ad3/FactorGraph.cpp(886) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(911) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(930) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(935) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(988) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(997) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(1054) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(1086) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(1089) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(1106) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(1144) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(1170) : warning C4018: '<' : signed/unsigned mismatch
ad3/FactorGraph.cpp(1174) : warning C4018: '<' : signed/unsigned mismatch
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I. -I./ad3 -I./Eigen /Tpad3/GenericFactor.cpp /Fobuild\temp.win-amd64-2.7\ad3/GenericFactor.obj
GenericFactor.cpp
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\Factor.h(111) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\Factor.h(128) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\Factor.h(179) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\GenericFactor.h(62) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(39) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(65) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(171) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(174) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(356) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(369) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(394) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(411) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(431) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(464) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(465) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(471) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(487) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(498) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(511) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(550) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(574) : warning C4018: '<' : signed/unsigned mismatch
ad3/GenericFactor.cpp(602) : warning C4018: '<' : signed/unsigned mismatch
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I. -I./ad3 -I./Eigen /Tpad3/Factor.cpp /Fobuild\temp.win-amd64-2.7\ad3/Factor.obj
Factor.cpp
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\Factor.h(111) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\Factor.h(128) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\Factor.h(179) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(107) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(112) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(116) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(121) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(138) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(146) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(232) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(237) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(241) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(251) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(271) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(292) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(300) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(387) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(392) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(396) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(407) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(429) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(440) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(445) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(455) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(571) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(575) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(579) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(593) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(607) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(614) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(633) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(644) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(649) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(651) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(660) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(671) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(676) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(689) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(706) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(711) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(717) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(730) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(745) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(761) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(772) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(777) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(787) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(818) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(823) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(829) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(842) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(850) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(869) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(892) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(903) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(908) : warning C4018: '<' : signed/unsigned mismatch
ad3/Factor.cpp(919) : warning C4018: '<' : signed/unsigned mismatch
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I. -I./ad3 -I./Eigen /Tpad3/Utils.cpp /Fobuild\temp.win-amd64-2.7\ad3/Utils.obj
Utils.cpp
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
ad3/Utils.cpp(68) : warning C4996: '__timezone': This function or variable may be unsafe. Consider using _get_timezone instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\time.h(150) : see declaration of '__timezone'
ad3/Utils.cpp(69) : warning C4996: '__daylight': This function or variable may be unsafe. Consider using _get_daylight instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\time.h(142) : see declaration of '__daylight'
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\lib.exe build\temp.win-amd64-2.7\ad3/FactorGraph.obj build\temp.win-amd64-2.7\ad3/GenericFactor.obj build\temp.win-amd64-2.7\ad3/Factor.obj build\temp.win-amd64-2.7\ad3/Utils.obj /OUT:build\temp.win-amd64-2.7\ad3.lib
Microsoft (R) Library Manager Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.

running build_ext
cythoning python/factor_graph.pyx to python\factor_graph.cpp
building 'ad3.factor_graph' extension
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\python
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Iad3 -I./ -IC:\Users\scram\Anaconda2\include -IC:\Users\scram\Anaconda2\PC /Tppython\factor_graph.cpp /Fobuild\temp.win-amd64-2.7\Release\python\factor_graph.obj
factor_graph.cpp
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../ad3/Factor.h(111) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../ad3/Factor.h(128) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../ad3/Factor.h(179) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\GenericFactor.h(62) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(43) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(66) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(70) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(92) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(111) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(129) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(142) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(173) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(184) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(193) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(203) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\ad3\FactorDense.h(207) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../ad3/FactorGraph.h(42) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../ad3/FactorGraph.h(45) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../ad3/FactorGraph.h(48) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../ad3/FactorGraph.h(204) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../ad3/FactorGraph.h(228) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../ad3/FactorGraph.h(270) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../ad3/FactorGraph.h(301) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/dense/FactorSequence.h(148) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/dense/FactorSequence.h(172) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/dense/FactorSequence.h(196) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/dense/FactorSequence.h(209) : warning C4018: '<' : signed/unsigned mismatch
examples/parsing/FactorHeadAutomaton.h(115) : warning C4018: '<' : signed/unsigned mismatch
examples/parsing/FactorHeadAutomaton.h(137) : warning C4018: '<' : signed/unsigned mismatch
examples/parsing/FactorHeadAutomaton.h(156) : warning C4018: '<' : signed/unsigned mismatch
examples/parsing/FactorHeadAutomaton.h(157) : warning C4018: '<' : signed/unsigned mismatch
examples/parsing/FactorHeadAutomaton.h(160) : warning C4018: '<' : signed/unsigned mismatch
examples/parsing/FactorHeadAutomaton.h(175) : warning C4018: '<' : signed/unsigned mismatch
examples/parsing/FactorHeadAutomaton.h(201) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorSequenceCompressor.h(128) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorSequenceCompressor.h(155) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorSequenceCompressor.h(180) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorSequenceCompressor.h(181) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorSequenceCompressor.h(184) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorSequenceCompressor.h(203) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorSequenceCompressor.h(229) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorSequenceCompressor.h(249) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorCompressionBudget.h(148) : warning C4018: '>=' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorCompressionBudget.h(183) : warning C4018: '>=' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorCompressionBudget.h(232) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorCompressionBudget.h(238) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorCompressionBudget.h(264) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorCompressionBudget.h(270) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorCompressionBudget.h(294) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorCompressionBudget.h(295) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorCompressionBudget.h(298) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorCompressionBudget.h(324) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorCompressionBudget.h(366) : warning C4018: '<' : signed/unsigned mismatch
examples/summarization/FactorGeneralTree.h(282) : warning C4018: '<' : signed/unsigned mismatch
examples/summarization/FactorGeneralTree.h(295) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorBinaryTree.h(109) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorBinaryTree.h(133) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorBinaryTree.h(154) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorBinaryTree.h(155) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorBinaryTree.h(158) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorBinaryTree.h(173) : warning C4018: '<' : signed/unsigned mismatch
examples/summarization/FactorGeneralTreeCounts.h(566) : warning C4018: '<' : signed/unsigned mismatch
examples/summarization/FactorGeneralTreeCounts.h(660) : warning C4018: '<' : signed/unsigned mismatch
examples/summarization/FactorGeneralTreeCounts.h(678) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorBinaryTreeCounts.h(103) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorBinaryTreeCounts.h(110) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorBinaryTreeCounts.h(138) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorBinaryTreeCounts.h(231) : warning C4018: '<' : signed/unsigned mismatch
c:\users\scram\appdata\local\temp\pip-nxpoek-build\python\../examples/summarization/FactorBinaryTreeCounts.h(244) : warning C4018: '<' : signed/unsigned mismatch
python\factor_graph.cpp(1343) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(1774) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(2279) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(2987) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(3237) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(3531) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(3797) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(3923) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(4173) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(4472) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(4557) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(4764) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(5049) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(5688) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(5805) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(6145) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(6351) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(6467) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(6600) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(6718) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(6851) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(7141) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
python\factor_graph.cpp(7726) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\Users\scram\Anaconda2\libs /LIBPATH:C:\Users\scram\Anaconda2\PCbuild\amd64 /LIBPATH:C:\Users\scram\Anaconda2\PC\VS9.0\amd64 /LIBPATH:build\temp.win-amd64-2.7 ad3.lib /EXPORT:initfactor_graph build\temp.win-amd64-2.7\Release\python\factor_graph.obj /OUT:build\lib.win-amd64-2.7\ad3\factor_graph.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\python\factor_graph.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release\python\factor_graph.pyd.manifest
python27.lib(python27.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\Bin\\link.exe' failed with exit status 1112

----------------------------------------

Command "C:\Users\scram\Anaconda2\python.exe -u -c "import setuptools, tokenize;file='c:\users\scram\appdata\local\temp\pip-nxpoek-build\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record c:\users\scram\appdata\local\temp\pip-3pcne5-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\scram\appdata\local\temp\pip-nxpoek-build\

@scramblingbalam
Copy link

AD3 installs without
error using
pip install -i https://pypi.anaconda.org/pypi/simple ad3
strangely running from console works
but running form spyder3 trhows this error

File "C:\Users\scram\Anaconda2\lib\site-packages\pystruct\inference\inference_methods.py", line 354, in inference_ad3
import ad3

File "C:\Users\scram\Anaconda2\lib\site-packages\ad3_init_.py", line 1, in
from factor_graph import PBinaryVariable, PFactorGraph, PMultiVariable

ImportError: DLL load failed: The specified procedure could not be found.

@vene
Copy link
Collaborator

vene commented Aug 4, 2017

There are binary wheels available on pypi now as of version 2.1: you should be able to simply do pip install ad3. Could you check if the issue is resolved this way? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests