Failed to compile and install postgreSQL V11 on macOS












-1















I downloaded postgreSQL V11 source code through github, but failed to compile and install it on macOS. This worked one month ago.



Here are the error messages:




gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 zic.o  -L../../src/port -L../../src/common   -Wl,-dead_strip_dylibs   -lpgcommon -lpgport -lz -lreadline -lm  -o zic 
ld: warning: ld: warning: ignoring file ../../src/common/libpgcommon.a, file was built for archive which is not the architecture being linked (x86_64): ../../src/common/libpgcommon.aignoring file ../../src/port/libpgport.a, file was built for archive which is not the architecture being linked (x86_64): ../../src/port/libpgport.a**

I searched on line but failed to find any useful information. Any idea for this? Thanks.








share|improve this question

























  • @arved, please check my answer, thanks.

    – Ren Chen
    Nov 22 '18 at 6:33
















-1















I downloaded postgreSQL V11 source code through github, but failed to compile and install it on macOS. This worked one month ago.



Here are the error messages:




gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 zic.o  -L../../src/port -L../../src/common   -Wl,-dead_strip_dylibs   -lpgcommon -lpgport -lz -lreadline -lm  -o zic 
ld: warning: ld: warning: ignoring file ../../src/common/libpgcommon.a, file was built for archive which is not the architecture being linked (x86_64): ../../src/common/libpgcommon.aignoring file ../../src/port/libpgport.a, file was built for archive which is not the architecture being linked (x86_64): ../../src/port/libpgport.a**

I searched on line but failed to find any useful information. Any idea for this? Thanks.








share|improve this question

























  • @arved, please check my answer, thanks.

    – Ren Chen
    Nov 22 '18 at 6:33














-1












-1








-1


1






I downloaded postgreSQL V11 source code through github, but failed to compile and install it on macOS. This worked one month ago.



Here are the error messages:




gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 zic.o  -L../../src/port -L../../src/common   -Wl,-dead_strip_dylibs   -lpgcommon -lpgport -lz -lreadline -lm  -o zic 
ld: warning: ld: warning: ignoring file ../../src/common/libpgcommon.a, file was built for archive which is not the architecture being linked (x86_64): ../../src/common/libpgcommon.aignoring file ../../src/port/libpgport.a, file was built for archive which is not the architecture being linked (x86_64): ../../src/port/libpgport.a**

I searched on line but failed to find any useful information. Any idea for this? Thanks.








share|improve this question
















I downloaded postgreSQL V11 source code through github, but failed to compile and install it on macOS. This worked one month ago.



Here are the error messages:




gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 zic.o  -L../../src/port -L../../src/common   -Wl,-dead_strip_dylibs   -lpgcommon -lpgport -lz -lreadline -lm  -o zic 
ld: warning: ld: warning: ignoring file ../../src/common/libpgcommon.a, file was built for archive which is not the architecture being linked (x86_64): ../../src/common/libpgcommon.aignoring file ../../src/port/libpgport.a, file was built for archive which is not the architecture being linked (x86_64): ../../src/port/libpgport.a**

I searched on line but failed to find any useful information. Any idea for this? Thanks.





postgresql macos linker-errors darwin






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 14:25









arved

2,69621739




2,69621739










asked Nov 14 '18 at 13:49









Ren ChenRen Chen

804




804













  • @arved, please check my answer, thanks.

    – Ren Chen
    Nov 22 '18 at 6:33



















  • @arved, please check my answer, thanks.

    – Ren Chen
    Nov 22 '18 at 6:33

















@arved, please check my answer, thanks.

– Ren Chen
Nov 22 '18 at 6:33





@arved, please check my answer, thanks.

– Ren Chen
Nov 22 '18 at 6:33












1 Answer
1






active

oldest

votes


















1














Finally I found the reason why postgreSQL v11 cannot be installed through source package on Mac.



I thought this issue should be simple, however, it is not.



It seems like the compiler is using the GNU ar(1)/ranlib(1) instead of the ones supplied by the Xcode toolchain.



So you need to run which -a ar and which -a ranlib to see the what you have in $PATH.



Then you can solve the problem based on the detailed answer in Static library built for archive which is not the architecture being linked (x86_64)






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53301773%2ffailed-to-compile-and-install-postgresql-v11-on-macos%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Finally I found the reason why postgreSQL v11 cannot be installed through source package on Mac.



    I thought this issue should be simple, however, it is not.



    It seems like the compiler is using the GNU ar(1)/ranlib(1) instead of the ones supplied by the Xcode toolchain.



    So you need to run which -a ar and which -a ranlib to see the what you have in $PATH.



    Then you can solve the problem based on the detailed answer in Static library built for archive which is not the architecture being linked (x86_64)






    share|improve this answer




























      1














      Finally I found the reason why postgreSQL v11 cannot be installed through source package on Mac.



      I thought this issue should be simple, however, it is not.



      It seems like the compiler is using the GNU ar(1)/ranlib(1) instead of the ones supplied by the Xcode toolchain.



      So you need to run which -a ar and which -a ranlib to see the what you have in $PATH.



      Then you can solve the problem based on the detailed answer in Static library built for archive which is not the architecture being linked (x86_64)






      share|improve this answer


























        1












        1








        1







        Finally I found the reason why postgreSQL v11 cannot be installed through source package on Mac.



        I thought this issue should be simple, however, it is not.



        It seems like the compiler is using the GNU ar(1)/ranlib(1) instead of the ones supplied by the Xcode toolchain.



        So you need to run which -a ar and which -a ranlib to see the what you have in $PATH.



        Then you can solve the problem based on the detailed answer in Static library built for archive which is not the architecture being linked (x86_64)






        share|improve this answer













        Finally I found the reason why postgreSQL v11 cannot be installed through source package on Mac.



        I thought this issue should be simple, however, it is not.



        It seems like the compiler is using the GNU ar(1)/ranlib(1) instead of the ones supplied by the Xcode toolchain.



        So you need to run which -a ar and which -a ranlib to see the what you have in $PATH.



        Then you can solve the problem based on the detailed answer in Static library built for archive which is not the architecture being linked (x86_64)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 22 '18 at 6:32









        Ren ChenRen Chen

        804




        804
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53301773%2ffailed-to-compile-and-install-postgresql-v11-on-macos%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Florida Star v. B. J. F.

            Error while running script in elastic search , gateway timeout

            Adding quotations to stringified JSON object values