You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Steven Ong (JIRA)" <ji...@apache.org> on 2010/04/11 04:08:40 UTC
[jira] Created: (THRIFT-757) Thrift (CPP) library, compiler, and
the example built and working successfully on Cygwin.
Thrift (CPP) library, compiler, and the example built and working successfully on Cygwin.
-----------------------------------------------------------------------------------------
Key: THRIFT-757
URL: https://issues.apache.org/jira/browse/THRIFT-757
Project: Thrift
Issue Type: Improvement
Components: Compiler (C++)
Affects Versions: 0.3
Environment: Cygwin (win32)
Reporter: Steven Ong
Fix For: 0.3
I managed to get Thrift (CPP) library, compiler, and the example built and working successfully on Cygwin. Note that I only tested with CPP (although I saw 'libthrift.jar' was built as well).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: [jira] Commented: (THRIFT-757) Thrift (CPP) library, compiler,
and the example built and working successfully on Cygwin.
Posted by Steven Ong <st...@gmail.com>.
OK, I'll try to come up with the patch files (it's been a while since last
one I've made).
Thanks,
Steven
On Thu, Aug 5, 2010 at 12:09 PM, Bryan Duxbury (JIRA) <ji...@apache.org>wrote:
>
> [
> https://issues.apache.org/jira/browse/THRIFT-757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895737#action_12895737]
>
> Bryan Duxbury commented on THRIFT-757:
> --------------------------------------
>
> Steven - I understand you already attached all the files, but it's much
> easier for committers to deal with a single patch file, since then I only
> have to keep track of one download, and all I have to do is run "patch -p0 <
> patchfile" to get stuff in place.
>
> > Thrift (CPP) library, compiler, and the example built and working
> successfully on Cygwin.
> >
> -----------------------------------------------------------------------------------------
> >
> > Key: THRIFT-757
> > URL: https://issues.apache.org/jira/browse/THRIFT-757
> > Project: Thrift
> > Issue Type: Improvement
> > Components: Compiler (C++)
> > Affects Versions: 0.3
> > Environment: Cygwin (win32)
> > Reporter: Steven Ong
> > Fix For: 0.4
> >
> > Attachments: buildCygwin.sh, buildNexenta.sh, Makefile,
> Thrift.cpp
> >
> > Original Estimate: 24h
> > Remaining Estimate: 24h
> >
> > I managed to get Thrift (CPP) library, compiler, and the example built
> and working successfully on Cygwin. Note that I only tested with CPP
> (although I saw 'libthrift.jar' was built as well).
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
[jira] Updated: (THRIFT-757) Thrift (CPP) library, compiler, and
the example built and working successfully on Cygwin.
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-757:
---------------------------------
Fix Version/s: 0.6
(was: 0.5)
I'm deprioritizing, unless any other committer with more understanding of what to do wants to take care of this one.
> Thrift (CPP) library, compiler, and the example built and working successfully on Cygwin.
> -----------------------------------------------------------------------------------------
>
> Key: THRIFT-757
> URL: https://issues.apache.org/jira/browse/THRIFT-757
> Project: Thrift
> Issue Type: Improvement
> Components: C++ - Compiler
> Affects Versions: 0.3
> Environment: Cygwin (win32)
> Reporter: Steven Ong
> Fix For: 0.6
>
> Attachments: buildCygwin.sh, buildNexenta.sh, Makefile, Thrift.cpp
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> I managed to get Thrift (CPP) library, compiler, and the example built and working successfully on Cygwin. Note that I only tested with CPP (although I saw 'libthrift.jar' was built as well).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-757) Thrift (CPP) library, compiler, and
the example built and working successfully on Cygwin.
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-757:
---------------------------------
Fix Version/s: 0.4
(was: 0.3)
Can you attach these files as a patch? I'm just not sure where I'm supposed to put them.
If you get back to me today, I'll include this in 0.3. Otherwise, it'll have to be in 0.4.
> Thrift (CPP) library, compiler, and the example built and working successfully on Cygwin.
> -----------------------------------------------------------------------------------------
>
> Key: THRIFT-757
> URL: https://issues.apache.org/jira/browse/THRIFT-757
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (C++)
> Affects Versions: 0.3
> Environment: Cygwin (win32)
> Reporter: Steven Ong
> Fix For: 0.4
>
> Attachments: buildCygwin.sh, buildNexenta.sh, Makefile, Thrift.cpp
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> I managed to get Thrift (CPP) library, compiler, and the example built and working successfully on Cygwin. Note that I only tested with CPP (although I saw 'libthrift.jar' was built as well).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-757) Thrift (CPP) library, compiler, and
the example built and working successfully on Cygwin.
Posted by "Steven Ong (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Ong updated THRIFT-757:
------------------------------
Attachment: buildCygwin.sh
buildNexenta.sh
buildCygwin.sh:
- a little script I wrote to configure/compile/install on Cygwin
buildNexenta.sh:
- a little script I wrote to configure/compile/install on Nexenta
*** Feel free to change them for your own use.
> Thrift (CPP) library, compiler, and the example built and working successfully on Cygwin.
> -----------------------------------------------------------------------------------------
>
> Key: THRIFT-757
> URL: https://issues.apache.org/jira/browse/THRIFT-757
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (C++)
> Affects Versions: 0.3
> Environment: Cygwin (win32)
> Reporter: Steven Ong
> Fix For: 0.3
>
> Attachments: buildCygwin.sh, buildNexenta.sh, Makefile, Thrift.cpp
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> I managed to get Thrift (CPP) library, compiler, and the example built and working successfully on Cygwin. Note that I only tested with CPP (although I saw 'libthrift.jar' was built as well).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (THRIFT-757) Thrift (CPP) library, compiler, and
the example built and working successfully on Cygwin.
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12895737#action_12895737 ]
Bryan Duxbury commented on THRIFT-757:
--------------------------------------
Steven - I understand you already attached all the files, but it's much easier for committers to deal with a single patch file, since then I only have to keep track of one download, and all I have to do is run "patch -p0 < patchfile" to get stuff in place.
> Thrift (CPP) library, compiler, and the example built and working successfully on Cygwin.
> -----------------------------------------------------------------------------------------
>
> Key: THRIFT-757
> URL: https://issues.apache.org/jira/browse/THRIFT-757
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (C++)
> Affects Versions: 0.3
> Environment: Cygwin (win32)
> Reporter: Steven Ong
> Fix For: 0.4
>
> Attachments: buildCygwin.sh, buildNexenta.sh, Makefile, Thrift.cpp
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> I managed to get Thrift (CPP) library, compiler, and the example built and working successfully on Cygwin. Note that I only tested with CPP (although I saw 'libthrift.jar' was built as well).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-757) Thrift (CPP) library, compiler, and
the example built and working successfully on Cygwin.
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-757:
---------------------------------
Fix Version/s: 0.5
(was: 0.4)
> Thrift (CPP) library, compiler, and the example built and working successfully on Cygwin.
> -----------------------------------------------------------------------------------------
>
> Key: THRIFT-757
> URL: https://issues.apache.org/jira/browse/THRIFT-757
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (C++)
> Affects Versions: 0.3
> Environment: Cygwin (win32)
> Reporter: Steven Ong
> Fix For: 0.5
>
> Attachments: buildCygwin.sh, buildNexenta.sh, Makefile, Thrift.cpp
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> I managed to get Thrift (CPP) library, compiler, and the example built and working successfully on Cygwin. Note that I only tested with CPP (although I saw 'libthrift.jar' was built as well).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-757) Thrift (CPP) library, compiler, and
the example built and working successfully on Cygwin.
Posted by "Steven Ong (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862801#action_12862801 ]
Steven Ong commented on THRIFT-757:
-----------------------------------
Hi,
First of all, I am away from my PC and will not get back until at least
tonight. However...
I did attached the files you need along with the JIRA I opned. All you need
to do is diff/merge this file with the current file:
Thrift.cpp
... and replace the "Makefile" in the 'example' directory with the one that
I attached (You can run a 'diff' and see what's changed).
Again, all the files you need had already attached in the JIRA.
Please let me know if I can be further help.
Thanks,
Steven
> Thrift (CPP) library, compiler, and the example built and working successfully on Cygwin.
> -----------------------------------------------------------------------------------------
>
> Key: THRIFT-757
> URL: https://issues.apache.org/jira/browse/THRIFT-757
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (C++)
> Affects Versions: 0.3
> Environment: Cygwin (win32)
> Reporter: Steven Ong
> Fix For: 0.4
>
> Attachments: buildCygwin.sh, buildNexenta.sh, Makefile, Thrift.cpp
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> I managed to get Thrift (CPP) library, compiler, and the example built and working successfully on Cygwin. Note that I only tested with CPP (although I saw 'libthrift.jar' was built as well).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-757) Thrift (CPP) library, compiler, and
the example built and working successfully on Cygwin.
Posted by "Steven Ong (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Ong updated THRIFT-757:
------------------------------
Attachment: Thrift.cpp
Makefile
Changes in Thrift.cpp:
$ diff /cygdrive/z/thrift-0.2.0/lib/cpp/src/Thrift.cpp ./Thrift.cpp
23d22
< #include <protocol/TProtocol.h>
25c24,36
< #include <stdio.h>
---
> //#include <stdio.h>
>
> #if defined(__CYGWIN__) && defined(__cplusplus)
> #include <cstdlib>
> #include <cstdio>
> #else
> #include <stdlib.h>
> #include <stdio.h>
> #endif
>
>
** Right after :
namespace apache { namespace thrift {
.......
>
28a40,43
> #if defined(__CYGWIN__) && defined(__cplusplus)
> using namespace std;
> #endif
... There are 2 issues here as far as Cygwin is concerning:
1. Missing the inclusion of "stdlib", hence, "malloc" not found
2. Even after I added the "stdlib" inclusion, "mallloc" still not found since I included "stdlib.h" and "malloc" was used inside "namespace apache". So I change for it to use "cstdlib" (and "cstdio") instead, but then I have to declare "using namespace std;" inside the "namespace apache". Just to prevent it may cause some side-effect in some other platform, I put the "#if defined(__CYGWIN__) && defined(__cplusplus)" wherever the changes are.
Also, I've tested on Nexenta. Look like it OK.
****************
Changes I've made to the ~/tutorial/cpp/Makefile:
$ diff /cygdrive/z/thrift-0.2.0/tutorial/cpp/Makefile ./Makefile
20,22d19
< BOOST_DIR = /usr/local/boost/include/boost-1_33_1/
< THRIFT_DIR = /usr/local/include/thrift
< LIB_DIR = /usr/local/lib
24c21,23
< GEN_SRC = ../gen-cpp/SharedService.cpp ../gen-cpp/shared_types.cpp ../gen-cpp/tutori al_types.cpp ../gen-cpp/Calculator.cpp
---
> # Change to the actual directory if need to
> THRIFT_DIR = /opt/thrift
> GEN_CPP = ../gen-cpp
26c25,27
< default: server client
---
> INCL = -I/opt/boostLib/boostS_1_41/include
> INCL += -I$(THRIFT_DIR)/include/thrift
> INCL += -I$(GEN_CPP)
28,29c29,30
< server: CppServer.cpp
< g++ -o CppServer -I${THRIFT_DIR} -I${BOOST_DIR} -I../gen-cpp -L${LIB_DIR} -lt hrift CppServer.cpp ${GEN_SRC}
---
> LIBS = -L$(THRIFT_DIR)/lib
> LIBS += -lthrift
31,32c32,43
< client: CppClient.cpp
< g++ -o CppClient -I${THRIFT_DIR} -I${BOOST_DIR} -I../gen-cpp -L${LIB_DIR} -lt hrift CppClient.cpp ${GEN_SRC}
---
> PROG = CppServer CppClient
>
> GEN_SRC = $(GEN_CPP)/SharedService.cpp
> GEN_SRC += $(GEN_CPP)/shared_types.cpp
> GEN_SRC += $(GEN_CPP)/tutorial_types.cpp
> GEN_SRC += $(GEN_CPP)/Calculator.cpp
>
> all: $(PROG)
>
> $(PROG):
> @echo Compiling $@
> g++ $(INCL) $@.cpp $(GEN_SRC) $(LIBS) -o $@
35c46,54
< $(RM) -r CppClient CppServer
---
> $(RM) -r $(PROG) *.o *.exe *~
>
> clean_clober: clean
> cd ../
> rm -rf gen-cpp
>
> generate:
> cd ../; $(THRIFT_DIR)/bin/thrift -r --gen cpp tutorial.thrift
>
- The previous Makefile was badly written. Plus Cygwin is more picky about Makefile, hence, the change. I've also tested this Makefile on Nexenta and it worked.
> Thrift (CPP) library, compiler, and the example built and working successfully on Cygwin.
> -----------------------------------------------------------------------------------------
>
> Key: THRIFT-757
> URL: https://issues.apache.org/jira/browse/THRIFT-757
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (C++)
> Affects Versions: 0.3
> Environment: Cygwin (win32)
> Reporter: Steven Ong
> Fix For: 0.3
>
> Attachments: Makefile, Thrift.cpp
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> I managed to get Thrift (CPP) library, compiler, and the example built and working successfully on Cygwin. Note that I only tested with CPP (although I saw 'libthrift.jar' was built as well).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira