You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/04/13 04:01:09 UTC

[GitHub] [pulsar] wenxuwan opened a new issue #6724: Compile client failed with container

wenxuwan opened a new issue #6724: Compile client failed with container
URL: https://github.com/apache/pulsar/issues/6724
 
 
   **Describe the bug**
   When i try to compile client with container,  it failed with link error.
   
   /opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-CentOS-linux/4.8.2/ld: /usr/local/lib/libsnappy.a(snappy.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
   
   In the container, i find the snappy compiled with  CFLAGS="-fPIC -O3" .
   # Snappy
   RUN curl -O -L https://github.com/google/snappy/releases/download/1.1.3/snappy-1.1.3.tar.gz && \
       tar xvfz snappy-1.1.3.tar.gz && \
       cd snappy-1.1.3 && \
       CFLAGS="-fPIC -O3" ./configure && \
       make && make install && \
       rm -rf /snappy-1.1.3 /snappy-1.1.3.tar.gz
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Go to '...'
   2. Click on '....'
   3. Scroll down to '....'
   4. See error
   
   **Expected behavior**
   A clear and concise description of what you expected to happen.
   
   **Screenshots**
   If applicable, add screenshots to help explain your problem.
   
   **Desktop (please complete the following information):**
    - OS: [e.g. iOS]
   
   **Additional context**
   Add any other context about the problem here.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] jiazhai commented on issue #6724: Compile client failed with container

Posted by GitBox <gi...@apache.org>.
jiazhai commented on issue #6724: Compile client failed with container
URL: https://github.com/apache/pulsar/issues/6724#issuecomment-613769492
 
 
   Thanks @wenxuwan for the help.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] sijie commented on issue #6724: Compile client failed with container

Posted by GitBox <gi...@apache.org>.
sijie commented on issue #6724: Compile client failed with container
URL: https://github.com/apache/pulsar/issues/6724#issuecomment-612826702
 
 
   @wenxuwan so the problem is not a pulsar issue, correct?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] sijie closed issue #6724: Compile client failed with container

Posted by GitBox <gi...@apache.org>.
sijie closed issue #6724: Compile client failed with container
URL: https://github.com/apache/pulsar/issues/6724
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] wenxuwan commented on issue #6724: Compile client failed with container

Posted by GitBox <gi...@apache.org>.
wenxuwan commented on issue #6724: Compile client failed with container
URL: https://github.com/apache/pulsar/issues/6724#issuecomment-612842980
 
 
   you can refer https://github.com/apache/pulsar/compare/master...wenxuwan:master?diff=unified#diff-7e19b76e860cce6cafee3c3707d04659
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] jiazhai edited a comment on issue #6724: Compile client failed with container

Posted by GitBox <gi...@apache.org>.
jiazhai edited a comment on issue #6724: Compile client failed with container
URL: https://github.com/apache/pulsar/issues/6724#issuecomment-613847507
 
 
   @wenxuwan Would you provide more details of how to reproduce it? 
   This Dockerfile that you changed in PR #6736 is called by the shell scripts in that dir:
   e.g. /pulsar/pulsar-client-cpp/docker/create-images.sh

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] wenxuwan commented on issue #6724: Compile client failed with container

Posted by GitBox <gi...@apache.org>.
wenxuwan commented on issue #6724: Compile client failed with container
URL: https://github.com/apache/pulsar/issues/6724#issuecomment-612779663
 
 
   Hi, for snappy the flag should be CXXFLAGS="-fPIC -O3"  instead of  CFLAGS="-fPIC -O3".After replacement, the compilation is normal

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] jiazhai commented on issue #6724: Compile client failed with container

Posted by GitBox <gi...@apache.org>.
jiazhai commented on issue #6724: Compile client failed with container
URL: https://github.com/apache/pulsar/issues/6724#issuecomment-613914535
 
 
   Thanks @wenxuwan for the details.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] sijie commented on issue #6724: Compile client failed with container

Posted by GitBox <gi...@apache.org>.
sijie commented on issue #6724: Compile client failed with container
URL: https://github.com/apache/pulsar/issues/6724#issuecomment-613305879
 
 
   @wenxuwan I see. Do you want to submit a pull request for this issue?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] sijie commented on issue #6724: Compile client failed with container

Posted by GitBox <gi...@apache.org>.
sijie commented on issue #6724: Compile client failed with container
URL: https://github.com/apache/pulsar/issues/6724#issuecomment-614362922
 
 
   I think #6741 has fixed this issue.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] wenxuwan edited a comment on issue #6724: Compile client failed with container

Posted by GitBox <gi...@apache.org>.
wenxuwan edited a comment on issue #6724: Compile client failed with container
URL: https://github.com/apache/pulsar/issues/6724#issuecomment-613854943
 
 
   > @wenxuwan Would you provide more details of how to reproduce it?
   > This Dockerfile that you changed in PR #6736 is called by the shell scripts in that dir:
   > e.g. /pulsar/pulsar-client-cpp/docker/create-images.sh
   
   @jiazhai 
   
   1. cd /pulsar/pulsar-client-cpp/docker/
   2.docker build --build-arg PYTHON_VERSION=3.7 --build-arg PYTHON_SPEC=cp37-cp37m . 
   3.start container and login
   4.run build-wheel-file-within-docker.sh 
   5. when finish compile and link .so file, you will meet the error:
   
   [ 90%] Built target pulsarStatic
   [ 90%] Linking CXX shared library _pulsar.so
   /opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-CentOS-linux/4.8.2/ld: /usr/local/lib/libsnappy.a(snappy.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
   /usr/local/lib/libsnappy.a: could not read symbols: Bad value
   collect2: error: ld returned 1 exit status
   make[2]: *** [python/_pulsar.so] Error 1
   make[1]: *** [python/CMakeFiles/_pulsar.dir/all] Error 2
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] wenxuwan commented on issue #6724: Compile client failed with container

Posted by GitBox <gi...@apache.org>.
wenxuwan commented on issue #6724: Compile client failed with container
URL: https://github.com/apache/pulsar/issues/6724#issuecomment-612832942
 
 
   > @wenxuwan so the problem is not a pulsar issue, correct?
   
   No, the dockerFile is pulsar's file.  So the problem is pulsar issue. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] wenxuwan commented on issue #6724: Compile client failed with container

Posted by GitBox <gi...@apache.org>.
wenxuwan commented on issue #6724: Compile client failed with container
URL: https://github.com/apache/pulsar/issues/6724#issuecomment-613854943
 
 
   > @wenxuwan Would you provide more details of how to reproduce it?
   > This Dockerfile that you changed in PR #6736 is called by the shell scripts in that dir:
   > e.g. /pulsar/pulsar-client-cpp/docker/create-images.sh
   
   1. cd /pulsar/pulsar-client-cpp/docker/
   2.docker build --build-arg PYTHON_VERSION=3.7 --build-arg PYTHON_SPEC=cp37-cp37m . 
   3.start container and login
   4.run build-wheel-file-within-docker.sh 
   5. when finish compile and link .so file, you will meet the error:
   
   [ 90%] Built target pulsarStatic
   [ 90%] Linking CXX shared library _pulsar.so
   /opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-CentOS-linux/4.8.2/ld: /usr/local/lib/libsnappy.a(snappy.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
   /usr/local/lib/libsnappy.a: could not read symbols: Bad value
   collect2: error: ld returned 1 exit status
   make[2]: *** [python/_pulsar.so] Error 1
   make[1]: *** [python/CMakeFiles/_pulsar.dir/all] Error 2
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] jiazhai commented on issue #6724: Compile client failed with container

Posted by GitBox <gi...@apache.org>.
jiazhai commented on issue #6724: Compile client failed with container
URL: https://github.com/apache/pulsar/issues/6724#issuecomment-613847507
 
 
   @wenxuwan Would you provide more details of how to reproduce it? 
   This Dockerfile that you changed in PR #6736 is called by the shell scripts in that dir:
   e.g. /pulsar/pulsar-client-cpp/docker/build-wheel-file-within-docker.sh

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services