Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#61271 closed defect (fixed)

mariadb-*-server: Unable to build on 10.11: fatal error: 'bcon.h' file not found

Reported by: mav2287 (James) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: mariadb-10.5

Description (last modified by michaelld (Michael Dickens))

When building Mariadb-10.5 server on OS X 10.11.6 (15G22010) I get the following errors:

Error: Failed to build mariadb-10.5: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.5/mariadb-10.5/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port mariadb-10.5-server failed

When I do tail 20 on the referenced log file I get this:

:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.5/mariadb-10.5/work/build/storage/spider && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/spider.dir/link.txt --verbose=ON
:info:build /opt/local/bin/clang++-mp-9.0 -pipe -Os -stdlib=libc++ -fstack-protector --param=ssp-buffer-size=4 -DHAVE_HANDLERSOCKET -DNDEBUG -D_FORTIFY_SOURCE=2 -DDBUG_OFF -arch x86_64 -mmacosx-version-min=10.11 -bundle -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names -o ha_spider.so CMakeFiles/spider.dir/spd_param.cc.o CMakeFiles/spider.dir/spd_sys_table.cc.o CMakeFiles/spider.dir/spd_trx.cc.o CMakeFiles/spider.dir/spd_db_conn.cc.o CMakeFiles/spider.dir/spd_conn.cc.o CMakeFiles/spider.dir/spd_table.cc.o CMakeFiles/spider.dir/spd_direct_sql.cc.o CMakeFiles/spider.dir/spd_udf.cc.o CMakeFiles/spider.dir/spd_ping_table.cc.o CMakeFiles/spider.dir/spd_copy_tables.cc.o CMakeFiles/spider.dir/spd_i_s.cc.o CMakeFiles/spider.dir/spd_malloc.cc.o CMakeFiles/spider.dir/ha_spider.cc.o CMakeFiles/spider.dir/spd_db_mysql.cc.o CMakeFiles/spider.dir/spd_db_handlersocket.cc.o CMakeFiles/spider.dir/spd_db_oracle.cc.o CMakeFiles/spider.dir/spd_group_by_handler.cc.o CMakeFiles/spider.dir/spd_db_include.cc.o CMakeFiles/spider.dir/hs_client/config.cpp.o CMakeFiles/spider.dir/hs_client/escape.cpp.o CMakeFiles/spider.dir/hs_client/fatal.cpp.o CMakeFiles/spider.dir/hs_client/hstcpcli.cpp.o CMakeFiles/spider.dir/hs_client/socket.cpp.o CMakeFiles/spider.dir/hs_client/string_util.cpp.o  -Wl,-rpath,/opt/local/lib ../../libservices/libmysqlservices.a -Wl,-bundle_loader,/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.5/mariadb-10.5/work/build/sql/mariadbd 
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.5/mariadb-10.5/work/build'
:info:build [ 97%] Built target spider
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.5/mariadb-10.5/work/build'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.5/mariadb-10.5/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.5/mariadb-10.5/work/build" && /usr/bin/make -j16 -w all VERBOSE=ON 
:info:build Exit code: 2
:error:build Failed to build mariadb-10.5: command execution failed
:debug:build Error code: CHILDSTATUS 45006 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"

I am getting similar errors with Mariadb 10.2 10.3 and 10.4 as well.

Attachments (4)

main.log.zip (175.0 KB) - added by mav2287 (James) 4 years ago.
main.mariadb-10.2.log.zip (810.2 KB) - added by mav2287 (James) 4 years ago.
10.11InstalledPorts.txt.zip (4.6 KB) - added by mav2287 (James) 4 years ago.
traceOuput.txt.zip (200.2 KB) - added by mav2287 (James) 4 years ago.

Download all attachments as: .zip

Change History (40)

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: mysql mariadb removed
Owner: set to michaelld
Port: mariadb-10.5 added; Mariadb-10.5 removed
Status: newassigned

Please attach the full (compressed) main.log file so that we can see what happened.

Changed 4 years ago by mav2287 (James)

Attachment: main.log.zip added

comment:2 in reply to:  1 Changed 4 years ago by mav2287 (James)

Just attached. Wasn't sure if you would need it.

Replying to ryandesign:

Please attach the full (compressed) main.log file so that we can see what happened.

comment:3 Changed 4 years ago by kencu (Ken)

mariadb-10.5/work/server-mariadb-10.5.5/storage/connect/cmgoconn.h:9:10: fatal error: 'bcon.h' file not found
:info:build #include <bcon.h>
:info:build          ^~~~~~~~

comment:4 Changed 4 years ago by kencu (Ken)

Summary: Unable to build Mariadb-10.5 on 10.11Unable to build Mariadb-10.5 on 10.11: fatal error: 'bcon.h' file not found

comment:5 Changed 4 years ago by michaelld (Michael Dickens)

Might be another stealth dependency? Let me boot my macOS 10.11 build system & see what happens there.

Changed 4 years ago by mav2287 (James)

Attachment: main.mariadb-10.2.log.zip added

comment:6 Changed 4 years ago by mav2287 (James)

Just attached the log file from Mariadb 10.2 on the same Xserve running 10.11 and it also won't build 10.2 either. I did a quick search of the log and found the same 'bcon.h' file not found error that is in the 10.5 log. I attached the full log for that as well. If needed I can try to compile Mariadb 10.3 and 10.4 on that same machine and upload those logs as well, but since 10.2 and 10.5 produce the same issues I am guessing 10.3 and 10.4 will too.

comment:7 Changed 4 years ago by michaelld (Michael Dickens)

Thanks for keeping on this! I'm updating my 10.11 boot ... still have a bunch of GCC ports to go -- which take a LONG time -- so it'll be tomorrow before I can be building any mariadb ports for testing for this ticket. I will note that I have mariadb 10.2 and 10.3 installed already ... so, sometime in the past this was doable!

comment:8 Changed 4 years ago by mav2287 (James)

Not a problem, just glad I can help. Mac Ports is what makes sure my 3,1 Xserve is still useful and gets to keep working!

Yes, this was working fine in the past. I have the following versions of Mariadb installed and working: mariadb @5.5.68_0 (active) mariadb-10.2 @10.2.30_1 (active) mariadb-10.2-server @10.2.30_0 (active). I try to run port updates at least once a month and about 3 months ago I ran "port upgrade outdated" and that was when Mariadb's build failed. I opened ticket #60805 when it happened and I was hoping the Clang fix would do it, but then I ran into this new issue a few days ago.

My Xserve is a semi-production server so if you need me to try building MariaDB on it I can do it in the evenings and upload the log if it fails. Once Mariadb will build again I am going to install all the Mariadb 10.X versions on this Xserve so in the future if there is a build issue on 10.11 I will catch it when I am doing updates.

comment:9 Changed 4 years ago by kencu (Ken)

do you have some mariadb variant set? Those are rarely tested -- we should start getting rid of most variants, to be honest; they are rarely tested and so cause much trouble for people.

comment:10 Changed 4 years ago by michaelld (Michael Dickens)

I got through all of the LLVM / Clang ports, then updated all of the non-*GCC* ports. Then, I was able to build mariadb-10.5 straight up, no errors. No variants ... so, yes, variants might be important. This also might be related to the opportunistic finding / using of various features ...

Changed 4 years ago by mav2287 (James)

Attachment: 10.11InstalledPorts.txt.zip added

comment:11 Changed 4 years ago by mav2287 (James)

Not sure what you mean by Mariadb variant. 10.2 was installed with "port install Mariadb-10.2-Server". With the issues with the other install I tried the exact same thing "port install mariadb-10.5-server" and it gave the same error. I also attached a file with all the ports I have installed on this server in case that helps.

comment:12 in reply to:  11 ; Changed 4 years ago by kencu (Ken)

Replying to mav2287:

Not sure what you mean by Mariadb variant.

variants are alternate builds of a port. You don't have many, I see, which is very good. They look like this xorg-xcb-proto @1.14_0+python37.

10.2 was installed with "port install Mariadb-10.2-Server".

Please try using "trace" mode, using the -t flag, which blocks most opportunistic finding issues:

sudo port -v -t install Mariadb-10.2-Server

comment:13 Changed 4 years ago by michaelld (Michael Dickens)

Description: modified (diff)
Summary: Unable to build Mariadb-10.5 on 10.11: fatal error: 'bcon.h' file not foundmariadb-*-server: Unable to build on 10.11: fatal error: 'bcon.h' file not found

Ah ... OK ... the "server" version rather than the "client" version. That's a totally different story!

comment:14 Changed 4 years ago by michaelld (Michael Dickens)

Let me kill the current *GCC* update and try mariadb-10.5-server ... I was just going for mariadb-10.5 ... my bad!

comment:15 Changed 4 years ago by michaelld (Michael Dickens)

FYI with my recent changes to the 10.4 and 10.5 portfiles, both the server and client build cleanly on ARM64 now ...

comment:16 Changed 4 years ago by michaelld (Michael Dickens)

hmmm ... the server 10.5 version build cleanly for me just now ... nice and quick too (it's not that big of a compile, especially compared with the client)

comment:17 in reply to:  12 Changed 4 years ago by mav2287 (James)

I have my Xserve trying to build mariadb 10.5 server with trace mode on right now. I'll grab the output and upload it if it doesn't complete successfully. For me it is always Mariadb itself that has the error before it gets to the server build.

comment:18 Changed 4 years ago by mav2287 (James)

Still got the error uploading output.

Changed 4 years ago by mav2287 (James)

Attachment: traceOuput.txt.zip added

comment:19 Changed 4 years ago by michaelld (Michael Dickens)

From the CMakeLists file, it looks like you have some mongo port installed and the mariadb ports are opportunistically trying to use it.

If you have an original (non trace) build around, can you attach 2 files:

$(port work mariadb-10.5)/build/CMakeCache.txt

$(port work mariadb-10.5)/build/CMakeFiles/CMakeOutput.log

Compress them first.

comment:20 Changed 4 years ago by michaelld (Michael Dickens)

Can you also try the following ... tweak the Portfile ($(port dir mariadb-10.5)/Portfile) so that the tail end of the configure.args-append starting at 214 reads:

                        -DCONNECT_WITH_LIBXML2=ON \
                        -DCONNECT_WITH_MONGO=OFF

I think that will take care of the issue here.

comment:21 Changed 4 years ago by michaelld (Michael Dickens)

Even better:

                        -DICONV_INCLUDE_DIR:PATH=${prefix}/include \
                        -DCONNECT_WITH_JDBC=OFF \
                        -DCONNECT_WITH_LIBXML2=ON \
                        -DCONNECT_WITH_MONGO=OFF \
                        -DCONNECT_WITH_ODBC=OFF \
                        -DCONNECT_WITH_REST=OFF

comment:22 Changed 4 years ago by michaelld (Michael Dickens)

Actually ... I'm just going to push this change, since it's really useful. We can fix it up down the road with variants if requested.

comment:23 Changed 4 years ago by michaelld (Michael Dickens)

In 81155a42c24d9f6d6e581d1ea3ac7b5eb67879bc/macports-ports (master):

mariadb-10.5: disable various CONNECT options

Prevents various opportunistic linking (or trying to)

Ref: #61271

comment:24 Changed 4 years ago by michaelld (Michael Dickens)

OK I just pushed the above change and did a rev-bump so that current installs will stop being opportunistic at least for those parts of CONNECT. Please update your ports tree & try building the 10.5 one again.

comment:25 Changed 4 years ago by michaelld (Michael Dickens)

I'll look into 10.2-4 "soon" ...

comment:26 Changed 4 years ago by mav2287 (James)

Got em! That solved the issue and it installed 10.5 Server no problem. If you want to apply that fix to the others 10.X versions I can try to build them as well.

comment:27 Changed 4 years ago by mav2287 (James)

Since it built this is a bit of overkill, but I did setup the my.cnf file and put the DB through its paces and all seems to be working as it should. As mentioned above if you want to apply the changes to other version of the port I can do the same with the other 10.X versions.

comment:28 Changed 4 years ago by michaelld (Michael Dickens)

In 87e028888940fdb31c53bcd7f75c7278630feae5/macports-ports (master):

mariadb-10.4: disable various CONNECT options

Prevents various opportunistic linking (or trying to)

Ref: #61271

comment:29 Changed 4 years ago by michaelld (Michael Dickens)

In 851caca4436a9f85512a7ae3933b1f70743fa9e5/macports-ports (master):

mariadb-10.3: disable various CONNECT options

Prevents various opportunistic linking (or trying to)

Ref: #61271

comment:30 Changed 4 years ago by michaelld (Michael Dickens)

In 257c9ff71196d43531128bf765cffdd720f526db/macports-ports (master):

mariadb-10.2: disable various CONNECT options

Prevents various opportunistic linking (or trying to)

Ref: #61271

comment:31 Changed 4 years ago by michaelld (Michael Dickens)

In 26f8019245d0f84bb3e70349bb23a521daf4f92d/macports-ports (master):

mariadb-10.1: disable various CONNECT options

Prevents various opportunistic linking (or trying to)

Ref: #61271

comment:32 Changed 4 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: assignedclosed

In ca8037596caae5ef2780d2a807e89148843960bd/macports-ports (master):

mariadb-10.0: disable various CONNECT options

Prevents various opportunistic linking (or trying to)

Closes: #61271

comment:33 Changed 4 years ago by michaelld (Michael Dickens)

@mav2287 : Thanks for your work here & the positive feedback on my initial 10.5 tweaks! I just updated the rest of the mariadb-10.* ports with equivalent changes to that for 10.5. I checked the CMake scripts & so I'm confident that these changes are accurate for all of the ports without even building them. That said, if you feel the need to build and test it's always good to have feedback -- one way or the other!

comment:34 Changed 4 years ago by mav2287 (James)

Just built 10.0 - 10.5 without issues. However, the mysql service only seems to run if I load 10.5. Whenever I load any other mariadb server version I get a "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)" even if I just use the default my.cnf values. Am I missing something? Should be able to unload and load the version to use, right?

comment:35 Changed 4 years ago by michaelld (Michael Dickens)

I would expect you could unload 1 version and load another, though you might need to tweak the cnf values. I'm never tried it myself & now I should ... in all of my copious free time :) At least we fixed the build issue noted in this ticket!

comment:36 Changed 4 years ago by mav2287 (James)

That’s what I tried, unloading them all and then loading each individual one by itself. I also tried with and without a custom my.cnf. I was looking for log outputs, but I couldn’t find them. That errors should be logging to somewhere but the log folders for each just stayed empty.

Note: See TracTickets for help on using tickets.