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

Compile from src errors for version 1.3.7 on window 10 #97

Closed
hu13 opened this issue Mar 8, 2019 · 6 comments
Closed

Compile from src errors for version 1.3.7 on window 10 #97

hu13 opened this issue Mar 8, 2019 · 6 comments

Comments

@hu13
Copy link

hu13 commented Mar 8, 2019

I have installed the required dependencies: like python, mingw, etc
Also, the same source code compiles successfully on macOS platform.

Failed at: make -C src -f Makefile.win32 dist

Cmd output:

mingw32-make[1]: Entering directory 'C:/Downloads/pacparser-1.3.7/pacparser-1.3.7/src/spidermonkey'
gcc.exe -D_IEEE_LIBM -DEXPORT_JS_API -DWIN32 -D_MINGW -D_WINDOWS -DXP_WIN -s   -c -o js/src/jsnum.o js/src/jsnum.c
js/src/jsnum.c: In function 'js_InitRuntimeNumberState':
js/src/jsnum.c:531:30: error: 'MCW_EM' undeclared (first use in this function)
 #define FIX_FPU() _control87(MCW_EM | PC_53, MCW_EM | MCW_PC)
                              ^
js/src/jsnum.c:549:5: note: in expansion of macro 'FIX_FPU'
     FIX_FPU();
     ^~~~~~~
js/src/jsnum.c:531:30: note: each undeclared identifier is reported only once for each function it appears in
 #define FIX_FPU() _control87(MCW_EM | PC_53, MCW_EM | MCW_PC)
                              ^
js/src/jsnum.c:549:5: note: in expansion of macro 'FIX_FPU'
     FIX_FPU();
     ^~~~~~~
js/src/jsnum.c:531:39: error: 'PC_53' undeclared (first use in this function)
 #define FIX_FPU() _control87(MCW_EM | PC_53, MCW_EM | MCW_PC)
                                       ^
js/src/jsnum.c:549:5: note: in expansion of macro 'FIX_FPU'
     FIX_FPU();
     ^~~~~~~
js/src/jsnum.c:531:55: error: 'MCW_PC' undeclared (first use in this function)
 #define FIX_FPU() _control87(MCW_EM | PC_53, MCW_EM | MCW_PC)
                                                       ^
js/src/jsnum.c:549:5: note: in expansion of macro 'FIX_FPU'
     FIX_FPU();
     ^~~~~~~
js/src/jsnum.c: In function 'js_InitNumberClass':
js/src/jsnum.c:531:30: error: 'MCW_EM' undeclared (first use in this function)
 #define FIX_FPU() _control87(MCW_EM | PC_53, MCW_EM | MCW_PC)
                              ^
js/src/jsnum.c:613:5: note: in expansion of macro 'FIX_FPU'
     FIX_FPU();
     ^~~~~~~
js/src/jsnum.c:531:39: error: 'PC_53' undeclared (first use in this function)
 #define FIX_FPU() _control87(MCW_EM | PC_53, MCW_EM | MCW_PC)
                                       ^
js/src/jsnum.c:613:5: note: in expansion of macro 'FIX_FPU'
     FIX_FPU();
     ^~~~~~~
js/src/jsnum.c:531:55: error: 'MCW_PC' undeclared (first use in this function)
 #define FIX_FPU() _control87(MCW_EM | PC_53, MCW_EM | MCW_PC)
                                                       ^
js/src/jsnum.c:613:5: note: in expansion of macro 'FIX_FPU'
     FIX_FPU();
     ^~~~~~~
<builtin>: recipe for target 'js/src/jsnum.o' failed
mingw32-make[1]: *** [js/src/jsnum.o] Error 1
mingw32-make[1]: Leaving directory 'C:/Downloads/pacparser-1.3.7/pacparser-1.3.7/src/spidermonkey'
Makefile.win32:37: recipe for target 'js.lib' failed
mingw32-make: *** [js.lib] Error 2
mingw32-make: Leaving directory 'C:/Downloads/pacparser-1.3.7/pacparser-1.3.7/src'

Any suggestions would be appreciated.

@hu13
Copy link
Author

hu13 commented Mar 9, 2019

I finally managed to compile the window version for python27 from src by cloning the master branch and changing a few keywords in the Makefile.win32. The src tagged on release links does not reflect the latest change on the master branch, which excludes fdlibm for pacparser.{o,dll}.

Also, if we run the makefile on PowerShell, we need to change cp to copy and rm -rf to powershell's equivalence which is rm <path> -r -fo.

@rushikeshkorde
Copy link

Hi @hu13. Can you please suggest the changes required in order to compile it on windows? I am getting the same error

@hu13
Copy link
Author

hu13 commented Mar 16, 2022

@rushikeshkorde check out this branch here: PreVeil#1
to see if you can build it using the modified script i made and the README.

it has worked for me at the time i needed it.

@hu13
Copy link
Author

hu13 commented Mar 25, 2022

@rushikeshkorde the maintainer has made a github action to build and publish this library:
https://github.com/manugarg/pacparser/releases/tag/v1.3.8
may have what you need.

@manugarg
Copy link
Owner

Moreover, I recently added Github actions to build python modules for all Python3 version on Linux, Windows and MacOS.

See this:
6c615e2

pip install pacparser==1.3.8.dev39 should work pretty much on all platforms. You'll not need the version specifier after the next release.

@manugarg
Copy link
Owner

@hu13 Closing this.

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

3 participants