You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/05/27 10:25:43 UTC

[GitHub] [incubator-doris] yangzhg opened a new pull request, #9815: [chore] fix some compatible problems on old linux distributions

yangzhg opened a new pull request, #9815:
URL: https://github.com/apache/incubator-doris/pull/9815

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem Summary:
    fix some compatible problems on old linux distributions
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes/No/I Don't know)
   2. Has unit tests been added: (Yes/No/No Need)
   3. Has document been added or modified: (Yes/No/No Need)
   4. Does it need to update dependencies: (Yes/No)
   5. Are there any changes that cannot be rolled back: (Yes/No)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] compiletheworld commented on a diff in pull request #9815: [chore] fix some compatible problems on old linux distributions

Posted by GitBox <gi...@apache.org>.
compiletheworld commented on code in PR #9815:
URL: https://github.com/apache/incubator-doris/pull/9815#discussion_r885691066


##########
thirdparty/build-thirdparty.sh:
##########
@@ -312,14 +312,17 @@ build_protobuf() {
     LDFLAGS="-L${TP_LIB_DIR} -static-libstdc++ -static-libgcc -Wl,--undefined=pthread_create" \
     ./configure --prefix=${TP_INSTALL_DIR} --disable-shared --enable-static --with-zlib=${TP_INSTALL_DIR}/include
 
-    # ATTN: If protoc is built fully statically with clang-14 on ubuntu,
-    #       it may core dump when parse some protobuf source files.
-    #       The root cause remains unknown, but it is possibly related glibc...
-    #       And, we don't actually need to be that static,
-    #       dyn-linking to glibc and etc. is OK
-    # cd src
-    # sed -i 's/^AM_LDFLAGS\(.*\)$/AM_LDFLAGS\1 -all-static/' Makefile
-    # cd -
+    # ATTN: If protoc is not built fully statically the linktime libc may newer than runtime.

Review Comment:
   Would you please create an issue associated with this pull request?
   I would like to know the dyn-link info of protoc in your env., info like
   
   1. `which ld`
   2. `ldd protoc`
   3. `ldd --version`
   
   Thanks.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman merged pull request #9815: [chore] fix some compatible problems on old linux distributions

Posted by GitBox <gi...@apache.org>.
morningman merged PR #9815:
URL: https://github.com/apache/incubator-doris/pull/9815


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] github-actions[bot] commented on pull request #9815: [chore] fix some compatible problems on old linux distributions

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #9815:
URL: https://github.com/apache/incubator-doris/pull/9815#issuecomment-1143056809

   PR approved by anyone and no changes requested.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] yangzhg commented on a diff in pull request #9815: [chore] fix some compatible problems on old linux distributions

Posted by GitBox <gi...@apache.org>.
yangzhg commented on code in PR #9815:
URL: https://github.com/apache/incubator-doris/pull/9815#discussion_r886260456


##########
thirdparty/build-thirdparty.sh:
##########
@@ -312,14 +312,17 @@ build_protobuf() {
     LDFLAGS="-L${TP_LIB_DIR} -static-libstdc++ -static-libgcc -Wl,--undefined=pthread_create" \
     ./configure --prefix=${TP_INSTALL_DIR} --disable-shared --enable-static --with-zlib=${TP_INSTALL_DIR}/include
 
-    # ATTN: If protoc is built fully statically with clang-14 on ubuntu,
-    #       it may core dump when parse some protobuf source files.
-    #       The root cause remains unknown, but it is possibly related glibc...
-    #       And, we don't actually need to be that static,
-    #       dyn-linking to glibc and etc. is OK
-    # cd src
-    # sed -i 's/^AM_LDFLAGS\(.*\)$/AM_LDFLAGS\1 -all-static/' Makefile
-    # cd -
+    # ATTN: If protoc is not built fully statically the linktime libc may newer than runtime.

Review Comment:
   this is not a problem with ldd, it is because of higher  version gcc or clang will link glibc new than 2.12, and for old version linux such as centos 6 only contain glibc  lower than 2.12



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] compiletheworld commented on a diff in pull request #9815: [chore] fix some compatible problems on old linux distributions

Posted by GitBox <gi...@apache.org>.
compiletheworld commented on code in PR #9815:
URL: https://github.com/apache/incubator-doris/pull/9815#discussion_r885691066


##########
thirdparty/build-thirdparty.sh:
##########
@@ -312,14 +312,17 @@ build_protobuf() {
     LDFLAGS="-L${TP_LIB_DIR} -static-libstdc++ -static-libgcc -Wl,--undefined=pthread_create" \
     ./configure --prefix=${TP_INSTALL_DIR} --disable-shared --enable-static --with-zlib=${TP_INSTALL_DIR}/include
 
-    # ATTN: If protoc is built fully statically with clang-14 on ubuntu,
-    #       it may core dump when parse some protobuf source files.
-    #       The root cause remains unknown, but it is possibly related glibc...
-    #       And, we don't actually need to be that static,
-    #       dyn-linking to glibc and etc. is OK
-    # cd src
-    # sed -i 's/^AM_LDFLAGS\(.*\)$/AM_LDFLAGS\1 -all-static/' Makefile
-    # cd -
+    # ATTN: If protoc is not built fully statically the linktime libc may newer than runtime.

Review Comment:
   Hi @yangzhg 
   Would you please create an issue associated with this pull request?
   I would like to know the dyn-link info of protoc in your env., info like
   
   1. `which ld`
   2. `ldd protoc`
   3. `ldd --version`
   
   Thanks.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] yangzhg commented on a diff in pull request #9815: [chore] fix some compatible problems on old linux distributions

Posted by GitBox <gi...@apache.org>.
yangzhg commented on code in PR #9815:
URL: https://github.com/apache/incubator-doris/pull/9815#discussion_r886259588


##########
thirdparty/build-thirdparty.sh:
##########
@@ -312,14 +312,17 @@ build_protobuf() {
     LDFLAGS="-L${TP_LIB_DIR} -static-libstdc++ -static-libgcc -Wl,--undefined=pthread_create" \
     ./configure --prefix=${TP_INSTALL_DIR} --disable-shared --enable-static --with-zlib=${TP_INSTALL_DIR}/include
 
-    # ATTN: If protoc is built fully statically with clang-14 on ubuntu,
-    #       it may core dump when parse some protobuf source files.
-    #       The root cause remains unknown, but it is possibly related glibc...
-    #       And, we don't actually need to be that static,
-    #       dyn-linking to glibc and etc. is OK
-    # cd src
-    # sed -i 's/^AM_LDFLAGS\(.*\)$/AM_LDFLAGS\1 -all-static/' Makefile
-    # cd -
+    # ATTN: If protoc is not built fully statically the linktime libc may newer than runtime.

Review Comment:
   <img width="883" alt="image" src="https://user-images.githubusercontent.com/9098473/171313194-6a6c2dc9-68a4-4c00-ad34-8b272dec7b08.png">
   



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] compiletheworld commented on a diff in pull request #9815: [chore] fix some compatible problems on old linux distributions

Posted by GitBox <gi...@apache.org>.
compiletheworld commented on code in PR #9815:
URL: https://github.com/apache/incubator-doris/pull/9815#discussion_r886313748


##########
thirdparty/build-thirdparty.sh:
##########
@@ -312,14 +312,17 @@ build_protobuf() {
     LDFLAGS="-L${TP_LIB_DIR} -static-libstdc++ -static-libgcc -Wl,--undefined=pthread_create" \
     ./configure --prefix=${TP_INSTALL_DIR} --disable-shared --enable-static --with-zlib=${TP_INSTALL_DIR}/include
 
-    # ATTN: If protoc is built fully statically with clang-14 on ubuntu,
-    #       it may core dump when parse some protobuf source files.
-    #       The root cause remains unknown, but it is possibly related glibc...
-    #       And, we don't actually need to be that static,
-    #       dyn-linking to glibc and etc. is OK
-    # cd src
-    # sed -i 's/^AM_LDFLAGS\(.*\)$/AM_LDFLAGS\1 -all-static/' Makefile
-    # cd -
+    # ATTN: If protoc is not built fully statically the linktime libc may newer than runtime.

Review Comment:
   > this is not a problem with ldd, it is because of higher version gcc or clang will link glibc new than 2.12, and for old version linux such as centos 6 only contain glibc lower than 2.12
   
   @yangzhg
   Sorry, I didn't make it clear, 
   1. Command `which ld` is for the linker info, in your env. it may be  `/usr/bin/ld` or `${path_to_ldb_toolchain}/bin/ld` 
   2. Command `ldd protoc` is for the dyn-linkage info of protoc, the result of linking
   3. Command `ldd --version` is for version checking of glibc of you env. 
   
   With the given info, it seems that protoc was built using the system's default linker `/usr/bin/ld` instead of `${path_to_ldb_toolchain}/bin/ld`? 
   
   To confirm that, you can check out `thirdparty/src/protobuf-${version}/config.log`,  by `grep`ing this line "checking if the linker",  for more info. about how protoc was built and linked.
   
   **Your patch works**, however, we can figure out why that version messed up if you are interested in digging config.log.
   
   BTW, we can also try to fix the wrong version of dyn-linked glibc by modifying protoc binary
   ```
   patchelf --replace-needed libc.so.6 ${path_to_ldb_toolchain}/lib/libc.so.6 protoc
   ```



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] yangzhg commented on a diff in pull request #9815: [chore] fix some compatible problems on old linux distributions

Posted by GitBox <gi...@apache.org>.
yangzhg commented on code in PR #9815:
URL: https://github.com/apache/incubator-doris/pull/9815#discussion_r886259173


##########
thirdparty/build-thirdparty.sh:
##########
@@ -312,14 +312,17 @@ build_protobuf() {
     LDFLAGS="-L${TP_LIB_DIR} -static-libstdc++ -static-libgcc -Wl,--undefined=pthread_create" \
     ./configure --prefix=${TP_INSTALL_DIR} --disable-shared --enable-static --with-zlib=${TP_INSTALL_DIR}/include
 
-    # ATTN: If protoc is built fully statically with clang-14 on ubuntu,
-    #       it may core dump when parse some protobuf source files.
-    #       The root cause remains unknown, but it is possibly related glibc...
-    #       And, we don't actually need to be that static,
-    #       dyn-linking to glibc and etc. is OK
-    # cd src
-    # sed -i 's/^AM_LDFLAGS\(.*\)$/AM_LDFLAGS\1 -all-static/' Makefile
-    # cd -
+    # ATTN: If protoc is not built fully statically the linktime libc may newer than runtime.

Review Comment:
   using the ldb_toochain 0.9



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] github-actions[bot] commented on pull request #9815: [chore] fix some compatible problems on old linux distributions

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #9815:
URL: https://github.com/apache/incubator-doris/pull/9815#issuecomment-1143056791

   PR approved by at least one committer and no changes requested.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on pull request #9815: [chore] fix some compatible problems on old linux distributions

Posted by GitBox <gi...@apache.org>.
morningman commented on PR #9815:
URL: https://github.com/apache/incubator-doris/pull/9815#issuecomment-1140411088

   Hi @yangzhg , could you create an issue to describe the problem?


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org