diff --git a/c_glib/arrow-glib/Makefile.am b/c_glib/arrow-glib/Makefile.am index a72d1e874402..e719cccfa85a 100644 --- a/c_glib/arrow-glib/Makefile.am +++ b/c_glib/arrow-glib/Makefile.am @@ -101,6 +101,25 @@ libarrow_glib_la_headers = \ uint64-array-builder.h \ uint64-data-type.h +libarrow_glib_la_headers += \ + io-file.h \ + io-file-mode.h \ + io-file-output-stream.h \ + io-input-stream.h \ + io-memory-mapped-file.h \ + io-output-stream.h \ + io-random-access-file.h \ + io-readable.h \ + io-writeable.h \ + io-writeable-file.h + +libarrow_glib_la_headers += \ + ipc-file-reader.h \ + ipc-file-writer.h \ + ipc-stream-reader.h \ + ipc-stream-writer.h \ + ipc-metadata-version.h + libarrow_glib_la_generated_headers = \ enums.h @@ -170,6 +189,25 @@ libarrow_glib_la_sources = \ $(libarrow_glib_la_headers) \ $(libarrow_glib_la_generated_sources) +libarrow_glib_la_sources += \ + io-file.cpp \ + io-file-mode.cpp \ + io-file-output-stream.cpp \ + io-input-stream.cpp \ + io-memory-mapped-file.cpp \ + io-output-stream.cpp \ + io-random-access-file.cpp \ + io-readable.cpp \ + io-writeable.cpp \ + io-writeable-file.cpp + +libarrow_glib_la_sources += \ + ipc-file-reader.cpp \ + ipc-file-writer.cpp \ + ipc-metadata-version.cpp \ + ipc-stream-reader.cpp \ + ipc-stream-writer.cpp + libarrow_glib_la_cpp_headers = \ array.hpp \ array-builder.hpp \ @@ -184,6 +222,25 @@ libarrow_glib_la_cpp_headers = \ table.hpp \ type.hpp +libarrow_glib_la_cpp_headers += \ + io-file.hpp \ + io-file-mode.hpp \ + io-file-output-stream.hpp \ + io-input-stream.hpp \ + io-memory-mapped-file.hpp \ + io-output-stream.hpp \ + io-random-access-file.hpp \ + io-readable.hpp \ + io-writeable.hpp \ + io-writeable-file.hpp + +libarrow_glib_la_cpp_headers += \ + ipc-file-reader.hpp \ + ipc-file-writer.hpp \ + ipc-metadata-version.hpp \ + ipc-stream-reader.hpp \ + ipc-stream-writer.hpp + libarrow_glib_la_SOURCES = \ $(libarrow_glib_la_sources) \ $(libarrow_glib_la_cpp_headers) @@ -221,205 +278,15 @@ stamp-enums.c: $(libarrow_glib_la_headers) enums.c.template $(libarrow_glib_la_headers)) > enums.c touch $@ -# libarrow-io-glib -lib_LTLIBRARIES += \ - libarrow-io-glib.la - -libarrow_io_glib_la_CXXFLAGS = \ - $(GLIB_CFLAGS) \ - $(ARROW_IO_CFLAGS) \ - $(GARROW_CXXFLAGS) - -libarrow_io_glib_la_LIBADD = \ - $(GLIB_LIBS) \ - $(ARROW_IO_LIBS) \ - libarrow-glib.la - -libarrow_io_glib_la_headers = \ - arrow-io-glib.h \ - io-file.h \ - io-file-mode.h \ - io-file-output-stream.h \ - io-input-stream.h \ - io-memory-mapped-file.h \ - io-output-stream.h \ - io-random-access-file.h \ - io-readable.h \ - io-writeable.h \ - io-writeable-file.h - -libarrow_io_glib_la_generated_headers = \ - io-enums.h - -libarrow_io_glib_la_generated_sources = \ - io-enums.c \ - $(libarrow_io_glib_la_generated_headers) - -libarrow_io_glib_la_sources = \ - io-file.cpp \ - io-file-mode.cpp \ - io-file-output-stream.cpp \ - io-input-stream.cpp \ - io-memory-mapped-file.cpp \ - io-output-stream.cpp \ - io-random-access-file.cpp \ - io-readable.cpp \ - io-writeable.cpp \ - io-writeable-file.cpp \ - $(libarrow_io_glib_la_headers) \ - $(libarrow_io_glib_la_generated_sources) - -libarrow_io_glib_la_cpp_headers = \ - arrow-io-glib.hpp \ - io-file.hpp \ - io-file-mode.hpp \ - io-file-output-stream.hpp \ - io-input-stream.hpp \ - io-memory-mapped-file.hpp \ - io-output-stream.hpp \ - io-random-access-file.hpp \ - io-readable.hpp \ - io-writeable.hpp \ - io-writeable-file.hpp - -libarrow_io_glib_la_SOURCES = \ - $(libarrow_io_glib_la_sources) \ - $(libarrow_io_glib_la_cpp_headers) - -BUILT_SOURCES += \ - $(libarrow_io_glib_la_genearted_sources) \ - stamp-io-enums.c \ - stamp-io-enums.h - -EXTRA_DIST += \ - io-enums.c.template \ - io-enums.h.template - -io-enums.h: stamp-io-enums.h - @true -stamp-io-enums.h: $(libarrow_io_glib_la_headers) io-enums.h.template - $(AM_V_GEN) \ - (cd $(srcdir) && \ - $(GLIB_MKENUMS) \ - --identifier-prefix GArrowIO \ - --symbol-prefix garrow_io \ - --template io-enums.h.template \ - $(libarrow_io_glib_la_headers)) > io-enums.h - touch $@ - -io-enums.c: stamp-io-enums.c - @true -stamp-io-enums.c: $(libarrow_io_glib_la_headers) io-enums.c.template - $(AM_V_GEN) \ - (cd $(srcdir) && \ - $(GLIB_MKENUMS) \ - --identifier-prefix GArrowIO \ - --symbol-prefix garrow_io \ - --template io-enums.c.template \ - $(libarrow_io_glib_la_headers)) > io-enums.c - touch $@ - -# libarrow-ipc-glib -lib_LTLIBRARIES += \ - libarrow-ipc-glib.la - -libarrow_ipc_glib_la_CXXFLAGS = \ - $(GLIB_CFLAGS) \ - $(ARROW_IPC_CFLAGS) \ - $(GARROW_CXXFLAGS) - -libarrow_ipc_glib_la_LIBADD = \ - $(GLIB_LIBS) \ - $(ARROW_IPC_LIBS) \ - libarrow-glib.la \ - libarrow-io-glib.la - -libarrow_ipc_glib_la_headers = \ - arrow-ipc-glib.h \ - ipc-file-reader.h \ - ipc-file-writer.h \ - ipc-stream-reader.h \ - ipc-stream-writer.h \ - ipc-metadata-version.h - -libarrow_ipc_glib_la_generated_headers = \ - ipc-enums.h - -libarrow_ipc_glib_la_generated_sources = \ - ipc-enums.c \ - $(libarrow_ipc_glib_la_generated_headers) - -libarrow_ipc_glib_la_sources = \ - ipc-file-reader.cpp \ - ipc-file-writer.cpp \ - ipc-metadata-version.cpp \ - ipc-stream-reader.cpp \ - ipc-stream-writer.cpp \ - $(libarrow_ipc_glib_la_headers) \ - $(libarrow_ipc_glib_la_generated_sources) - -libarrow_ipc_glib_la_cpp_headers = \ - arrow-ipc-glib.hpp \ - ipc-file-reader.hpp \ - ipc-file-writer.hpp \ - ipc-metadata-version.hpp \ - ipc-stream-reader.hpp \ - ipc-stream-writer.hpp - -libarrow_ipc_glib_la_SOURCES = \ - $(libarrow_ipc_glib_la_sources) \ - $(libarrow_ipc_glib_la_cpp_headers) - -BUILT_SOURCES += \ - $(libarrow_ipc_glib_la_genearted_sources) \ - stamp-ipc-enums.c \ - stamp-ipc-enums.h - -EXTRA_DIST += \ - ipc-enums.c.template \ - ipc-enums.h.template - -ipc-enums.h: stamp-ipc-enums.h - @true -stamp-ipc-enums.h: $(libarrow_ipc_glib_la_headers) ipc-enums.h.template - $(AM_V_GEN) \ - (cd $(srcdir) && \ - $(GLIB_MKENUMS) \ - --identifier-prefix GArrowIPC \ - --symbol-prefix garrow_ipc \ - --template ipc-enums.h.template \ - $(libarrow_ipc_glib_la_headers)) > ipc-enums.h - touch $@ - -ipc-enums.c: stamp-ipc-enums.c - @true -stamp-ipc-enums.c: $(libarrow_ipc_glib_la_headers) ipc-enums.c.template - $(AM_V_GEN) \ - (cd $(srcdir) && \ - $(GLIB_MKENUMS) \ - --identifier-prefix GArrowIPC \ - --symbol-prefix garrow_ipc \ - --template ipc-enums.c.template \ - $(libarrow_ipc_glib_la_headers)) > ipc-enums.c - touch $@ - arrow_glib_includedir = $(includedir)/arrow-glib -arrow_glib_include_HEADERS = \ - $(libarrow_glib_la_headers) \ - $(libarrow_glib_la_cpp_headers) \ - $(libarrow_glib_la_generated_headers) \ - $(libarrow_io_glib_la_headers) \ - $(libarrow_io_glib_la_cpp_headers) \ - $(libarrow_io_glib_la_generated_headers) \ - $(libarrow_ipc_glib_la_headers) \ - $(libarrow_ipc_glib_la_cpp_headers) \ - $(libarrow_ipc_glib_la_generated_headers) +arrow_glib_include_HEADERS = \ + $(libarrow_glib_la_headers) \ + $(libarrow_glib_la_cpp_headers) \ + $(libarrow_glib_la_generated_headers) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = \ - arrow-glib.pc \ - arrow-io-glib.pc \ - arrow-ipc-glib.pc + arrow-glib.pc # GObject Introspection -include $(INTROSPECTION_MAKEFILE) @@ -443,44 +310,6 @@ Arrow_1_0_gir_SCANNERFLAGS = \ --symbol-prefix=garrow INTROSPECTION_GIRS += Arrow-1.0.gir -ArrowIO-1.0.gir: libarrow-io-glib.la -ArrowIO-1.0.gir: Arrow-1.0.gir -ArrowIO_1_0_gir_PACKAGES = \ - gobject-2.0 -ArrowIO_1_0_gir_EXPORT_PACKAGES = arrow-io -ArrowIO_1_0_gir_INCLUDES = \ - GObject-2.0 -ArrowIO_1_0_gir_CFLAGS = \ - $(AM_CPPFLAGS) -ArrowIO_1_0_gir_LIBS = libarrow-io-glib.la -ArrowIO_1_0_gir_FILES = $(libarrow_io_glib_la_sources) -ArrowIO_1_0_gir_SCANNERFLAGS = \ - --include-uninstalled=$(builddir)/Arrow-1.0.gir \ - --warn-all \ - --identifier-prefix=GArrowIO \ - --symbol-prefix=garrow_io -INTROSPECTION_GIRS += ArrowIO-1.0.gir - -ArrowIPC-1.0.gir: libarrow-ipc-glib.la -ArrowIPC-1.0.gir: Arrow-1.0.gir -ArrowIPC-1.0.gir: ArrowIO-1.0.gir -ArrowIPC_1_0_gir_PACKAGES = \ - gobject-2.0 -ArrowIPC_1_0_gir_EXPORT_PACKAGES = arrow-ipc -ArrowIPC_1_0_gir_INCLUDES = \ - GObject-2.0 -ArrowIPC_1_0_gir_CFLAGS = \ - $(AM_CPPFLAGS) -ArrowIPC_1_0_gir_LIBS = libarrow-ipc-glib.la -ArrowIPC_1_0_gir_FILES = $(libarrow_ipc_glib_la_sources) -ArrowIPC_1_0_gir_SCANNERFLAGS = \ - --include-uninstalled=$(builddir)/Arrow-1.0.gir \ - --include-uninstalled=$(builddir)/ArrowIO-1.0.gir \ - --warn-all \ - --identifier-prefix=GArrowIPC \ - --symbol-prefix=garrow_ipc -INTROSPECTION_GIRS += ArrowIPC-1.0.gir - girdir = $(datadir)/gir-1.0 gir_DATA = $(INTROSPECTION_GIRS) diff --git a/c_glib/arrow-glib/arrow-glib.h b/c_glib/arrow-glib/arrow-glib.h index 4356234a4a63..9b03175799f4 100644 --- a/c_glib/arrow-glib/arrow-glib.h +++ b/c_glib/arrow-glib/arrow-glib.h @@ -78,3 +78,20 @@ #include #include #include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include diff --git a/c_glib/arrow-glib/arrow-glib.hpp b/c_glib/arrow-glib/arrow-glib.hpp index 70fda8da7c52..fd59d4a1a924 100644 --- a/c_glib/arrow-glib/arrow-glib.hpp +++ b/c_glib/arrow-glib/arrow-glib.hpp @@ -35,3 +35,19 @@ #include #include #include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include diff --git a/c_glib/arrow-glib/arrow-io-glib.h b/c_glib/arrow-glib/arrow-io-glib.h deleted file mode 100644 index 4d49a9859d82..000000000000 --- a/c_glib/arrow-glib/arrow-io-glib.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include diff --git a/c_glib/arrow-glib/arrow-io-glib.hpp b/c_glib/arrow-glib/arrow-io-glib.hpp deleted file mode 100644 index 3e7636cc7ef9..000000000000 --- a/c_glib/arrow-glib/arrow-io-glib.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include -#include diff --git a/c_glib/arrow-glib/arrow-io-glib.pc.in b/c_glib/arrow-glib/arrow-io-glib.pc.in deleted file mode 100644 index 4256184cf734..000000000000 --- a/c_glib/arrow-glib/arrow-io-glib.pc.in +++ /dev/null @@ -1,28 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: Apache Arrow I/O GLib -Description: C API for Apache Arrow I/O based on GLib -Version: @VERSION@ -Libs: -L${libdir} -larrow-glib-io -Cflags: -I${includedir} -Requires: arrow-glib arrow-io diff --git a/c_glib/arrow-glib/arrow-ipc-glib.h b/c_glib/arrow-glib/arrow-ipc-glib.h deleted file mode 100644 index 4954d83cd072..000000000000 --- a/c_glib/arrow-glib/arrow-ipc-glib.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#pragma once - -#include -#include -#include -#include -#include -#include diff --git a/c_glib/arrow-glib/arrow-ipc-glib.hpp b/c_glib/arrow-glib/arrow-ipc-glib.hpp deleted file mode 100644 index d32bc052b98e..000000000000 --- a/c_glib/arrow-glib/arrow-ipc-glib.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#pragma once - -#include - -#include - -#include -#include -#include -#include -#include diff --git a/c_glib/arrow-glib/arrow-ipc-glib.pc.in b/c_glib/arrow-glib/arrow-ipc-glib.pc.in deleted file mode 100644 index 0b04c4a808ff..000000000000 --- a/c_glib/arrow-glib/arrow-ipc-glib.pc.in +++ /dev/null @@ -1,28 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: Apache Arrow IPC GLib -Description: C API for Apache Arrow IPC based on GLib -Version: @VERSION@ -Libs: -L${libdir} -larrow-glib-ipc -Cflags: -I${includedir} -Requires: arrow-glib-io arrow-ipc diff --git a/c_glib/arrow-glib/io-enums.c.template b/c_glib/arrow-glib/io-enums.c.template deleted file mode 100644 index 10ee77588d98..000000000000 --- a/c_glib/arrow-glib/io-enums.c.template +++ /dev/null @@ -1,56 +0,0 @@ -/*** BEGIN file-header ***/ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -/*** END file-header ***/ - -/*** BEGIN file-production ***/ - -/* enumerations from "@filename@" */ -/*** END file-production ***/ - -/*** BEGIN value-header ***/ -GType -@enum_name@_get_type(void) -{ - static GType etype = 0; - if (G_UNLIKELY(etype == 0)) { - static const G@Type@Value values[] = { -/*** END value-header ***/ - -/*** BEGIN value-production ***/ - {@VALUENAME@, "@VALUENAME@", "@valuenick@"}, -/*** END value-production ***/ - -/*** BEGIN value-tail ***/ - {0, NULL, NULL} - }; - etype = g_@type@_register_static(g_intern_static_string("@EnumName@"), values); - } - return etype; -} -/*** END value-tail ***/ - -/*** BEGIN file-tail ***/ -/*** END file-tail ***/ diff --git a/c_glib/arrow-glib/io-enums.h.template b/c_glib/arrow-glib/io-enums.h.template deleted file mode 100644 index 429141dc76a6..000000000000 --- a/c_glib/arrow-glib/io-enums.h.template +++ /dev/null @@ -1,41 +0,0 @@ -/*** BEGIN file-header ***/ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#pragma once - -#include - -G_BEGIN_DECLS -/*** END file-header ***/ - -/*** BEGIN file-production ***/ - -/* enumerations from "@filename@" */ -/*** END file-production ***/ - -/*** BEGIN value-header ***/ -GType @enum_name@_get_type(void) G_GNUC_CONST; -#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) -/*** END value-header ***/ - -/*** BEGIN file-tail ***/ - -G_END_DECLS -/*** END file-tail ***/ diff --git a/c_glib/arrow-glib/ipc-enums.c.template b/c_glib/arrow-glib/ipc-enums.c.template deleted file mode 100644 index c938f7747717..000000000000 --- a/c_glib/arrow-glib/ipc-enums.c.template +++ /dev/null @@ -1,56 +0,0 @@ -/*** BEGIN file-header ***/ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -/*** END file-header ***/ - -/*** BEGIN file-production ***/ - -/* enumerations from "@filename@" */ -/*** END file-production ***/ - -/*** BEGIN value-header ***/ -GType -@enum_name@_get_type(void) -{ - static GType etype = 0; - if (G_UNLIKELY(etype == 0)) { - static const G@Type@Value values[] = { -/*** END value-header ***/ - -/*** BEGIN value-production ***/ - {@VALUENAME@, "@VALUENAME@", "@valuenick@"}, -/*** END value-production ***/ - -/*** BEGIN value-tail ***/ - {0, NULL, NULL} - }; - etype = g_@type@_register_static(g_intern_static_string("@EnumName@"), values); - } - return etype; -} -/*** END value-tail ***/ - -/*** BEGIN file-tail ***/ -/*** END file-tail ***/ diff --git a/c_glib/arrow-glib/ipc-enums.h.template b/c_glib/arrow-glib/ipc-enums.h.template deleted file mode 100644 index e103c5bfeb98..000000000000 --- a/c_glib/arrow-glib/ipc-enums.h.template +++ /dev/null @@ -1,41 +0,0 @@ -/*** BEGIN file-header ***/ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#pragma once - -#include - -G_BEGIN_DECLS -/*** END file-header ***/ - -/*** BEGIN file-production ***/ - -/* enumerations from "@filename@" */ -/*** END file-production ***/ - -/*** BEGIN value-header ***/ -GType @enum_name@_get_type(void) G_GNUC_CONST; -#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) -/*** END value-header ***/ - -/*** BEGIN file-tail ***/ - -G_END_DECLS -/*** END file-tail ***/ diff --git a/c_glib/configure.ac b/c_glib/configure.ac index fc24c1b3c477..d63132e6f293 100644 --- a/c_glib/configure.ac +++ b/c_glib/configure.ac @@ -74,27 +74,17 @@ AC_ARG_WITH(arrow-cpp-build-dir, [GARROW_ARROW_CPP_BUILD_DIR=""]) if test "x$GARROW_ARROW_CPP_BUILD_DIR" = "x"; then PKG_CHECK_MODULES([ARROW], [arrow]) - PKG_CHECK_MODULES([ARROW_IO], [arrow-io]) - PKG_CHECK_MODULES([ARROW_IPC], [arrow-ipc]) else ARROW_INCLUDE_DIR="\$(abs_top_srcdir)/../cpp/src" ARROW_LIB_DIR="${GARROW_ARROW_CPP_BUILD_DIR}/${GARROW_ARROW_CPP_BUILD_TYPE}" ARROW_CFLAGS="-I${ARROW_INCLUDE_DIR}" - ARROW_IO_CFLAGS="-I${ARROW_INCLUDE_DIR}" - ARROW_IPC_CFLAGS="-I${ARROW_INCLUDE_DIR}" ARROW_LIBS="-L${ARROW_LIB_DIR} -larrow" - ARROW_IO_LIBS="-L${ARROW_LIB_DIR} -larrow_io" - ARROW_IPC_LIBS="-L${ARROW_LIB_DIR} -larrow_ipc" AC_SUBST(ARROW_LIB_DIR) AC_SUBST(ARROW_CFLAGS) - AC_SUBST(ARROW_IO_CFLAGS) - AC_SUBST(ARROW_IPC_CFLAGS) AC_SUBST(ARROW_LIBS) - AC_SUBST(ARROW_IO_LIBS) - AC_SUBST(ARROW_IPC_LIBS) fi @@ -102,8 +92,6 @@ AC_CONFIG_FILES([ Makefile arrow-glib/Makefile arrow-glib/arrow-glib.pc - arrow-glib/arrow-io-glib.pc - arrow-glib/arrow-ipc-glib.pc doc/Makefile doc/reference/Makefile example/Makefile diff --git a/c_glib/doc/reference/Makefile.am b/c_glib/doc/reference/Makefile.am index d1c8e01c299a..116bc6ce1b9a 100644 --- a/c_glib/doc/reference/Makefile.am +++ b/c_glib/doc/reference/Makefile.am @@ -33,9 +33,7 @@ HFILE_GLOB = \ $(top_srcdir)/arrow-glib/*.h IGNORE_HFILES = \ - enums.h \ - io-enums.h \ - ipc-enums.h + enums.h CFILE_GLOB = \ $(top_srcdir)/arrow-glib/*.cpp @@ -49,9 +47,7 @@ AM_CFLAGS = \ $(ARROW_CFLAGS) GTKDOC_LIBS = \ - $(top_builddir)/arrow-glib/libarrow-glib.la \ - $(top_builddir)/arrow-glib/libarrow-io-glib.la \ - $(top_builddir)/arrow-glib/libarrow-ipc-glib.la + $(top_builddir)/arrow-glib/libarrow-glib.la include $(srcdir)/gtk-doc.make diff --git a/c_glib/test/run-test.rb b/c_glib/test/run-test.rb index 32ceb4ad61d2..53805caef374 100755 --- a/c_glib/test/run-test.rb +++ b/c_glib/test/run-test.rb @@ -32,8 +32,6 @@ require "gi" Arrow = GI.load("Arrow") -ArrowIO = GI.load("ArrowIO") -ArrowIPC = GI.load("ArrowIPC") require "tempfile" require_relative "helper/buildable" diff --git a/c_glib/test/test-io-file-output-stream.rb b/c_glib/test/test-io-file-output-stream.rb index 1f2ae5fa10fd..e35a18361aab 100644 --- a/c_glib/test/test-io-file-output-stream.rb +++ b/c_glib/test/test-io-file-output-stream.rb @@ -21,7 +21,7 @@ def test_create tempfile = Tempfile.open("arrow-io-file-output-stream") tempfile.write("Hello") tempfile.close - file = ArrowIO::FileOutputStream.open(tempfile.path, false) + file = Arrow::IOFileOutputStream.open(tempfile.path, false) file.close assert_equal("", File.read(tempfile.path)) end @@ -30,7 +30,7 @@ def test_append tempfile = Tempfile.open("arrow-io-file-output-stream") tempfile.write("Hello") tempfile.close - file = ArrowIO::FileOutputStream.open(tempfile.path, true) + file = Arrow::IOFileOutputStream.open(tempfile.path, true) file.close assert_equal("Hello", File.read(tempfile.path)) end diff --git a/c_glib/test/test-io-memory-mapped-file.rb b/c_glib/test/test-io-memory-mapped-file.rb index 609819833614..197d1886f1e8 100644 --- a/c_glib/test/test-io-memory-mapped-file.rb +++ b/c_glib/test/test-io-memory-mapped-file.rb @@ -20,7 +20,7 @@ def test_open tempfile = Tempfile.open("arrow-io-memory-mapped-file") tempfile.write("Hello") tempfile.close - file = ArrowIO::MemoryMappedFile.open(tempfile.path, :read) + file = Arrow::IOMemoryMappedFile.open(tempfile.path, :read) begin buffer = " " * 5 file.read(buffer) @@ -34,7 +34,7 @@ def test_size tempfile = Tempfile.open("arrow-io-memory-mapped-file") tempfile.write("Hello") tempfile.close - file = ArrowIO::MemoryMappedFile.open(tempfile.path, :read) + file = Arrow::IOMemoryMappedFile.open(tempfile.path, :read) begin assert_equal(5, file.size) ensure @@ -46,7 +46,7 @@ def test_read tempfile = Tempfile.open("arrow-io-memory-mapped-file") tempfile.write("Hello World") tempfile.close - file = ArrowIO::MemoryMappedFile.open(tempfile.path, :read) + file = Arrow::IOMemoryMappedFile.open(tempfile.path, :read) begin buffer = " " * 5 _success, n_read_bytes = file.read(buffer) @@ -60,7 +60,7 @@ def test_read_at tempfile = Tempfile.open("arrow-io-memory-mapped-file") tempfile.write("Hello World") tempfile.close - file = ArrowIO::MemoryMappedFile.open(tempfile.path, :read) + file = Arrow::IOMemoryMappedFile.open(tempfile.path, :read) begin buffer = " " * 5 _success, n_read_bytes = file.read_at(6, buffer) @@ -74,7 +74,7 @@ def test_write tempfile = Tempfile.open("arrow-io-memory-mapped-file") tempfile.write("Hello") tempfile.close - file = ArrowIO::MemoryMappedFile.open(tempfile.path, :readwrite) + file = Arrow::IOMemoryMappedFile.open(tempfile.path, :readwrite) begin file.write("World") ensure @@ -87,7 +87,7 @@ def test_write_at tempfile = Tempfile.open("arrow-io-memory-mapped-file") tempfile.write("Hello") tempfile.close - file = ArrowIO::MemoryMappedFile.open(tempfile.path, :readwrite) + file = Arrow::IOMemoryMappedFile.open(tempfile.path, :readwrite) begin file.write_at(2, "rld") ensure @@ -100,7 +100,7 @@ def test_flush tempfile = Tempfile.open("arrow-io-memory-mapped-file") tempfile.write("Hello") tempfile.close - file = ArrowIO::MemoryMappedFile.open(tempfile.path, :readwrite) + file = Arrow::IOMemoryMappedFile.open(tempfile.path, :readwrite) begin file.write("World") file.flush @@ -114,7 +114,7 @@ def test_tell tempfile = Tempfile.open("arrow-io-memory-mapped-file") tempfile.write("Hello World") tempfile.close - file = ArrowIO::MemoryMappedFile.open(tempfile.path, :read) + file = Arrow::IOMemoryMappedFile.open(tempfile.path, :read) begin buffer = " " * 5 file.read(buffer) @@ -128,9 +128,9 @@ def test_mode tempfile = Tempfile.open("arrow-io-memory-mapped-file") tempfile.write("Hello World") tempfile.close - file = ArrowIO::MemoryMappedFile.open(tempfile.path, :readwrite) + file = Arrow::IOMemoryMappedFile.open(tempfile.path, :readwrite) begin - assert_equal(ArrowIO::FileMode::READWRITE, file.mode) + assert_equal(Arrow::IOFileMode::READWRITE, file.mode) ensure file.close end diff --git a/c_glib/test/test-ipc-file-writer.rb b/c_glib/test/test-ipc-file-writer.rb index 369bff324e6d..1c33ccc1919e 100644 --- a/c_glib/test/test-ipc-file-writer.rb +++ b/c_glib/test/test-ipc-file-writer.rb @@ -18,11 +18,11 @@ class TestIPCFileWriter < Test::Unit::TestCase def test_write_record_batch tempfile = Tempfile.open("arrow-ipc-file-writer") - output = ArrowIO::FileOutputStream.open(tempfile.path, false) + output = Arrow::IOFileOutputStream.open(tempfile.path, false) begin field = Arrow::Field.new("enabled", Arrow::BooleanDataType.new) schema = Arrow::Schema.new([field]) - file_writer = ArrowIPC::FileWriter.open(output, schema) + file_writer = Arrow::IPCFileWriter.open(output, schema) begin record_batch = Arrow::RecordBatch.new(schema, 0, []) file_writer.write_record_batch(record_batch) @@ -33,9 +33,9 @@ def test_write_record_batch output.close end - input = ArrowIO::MemoryMappedFile.open(tempfile.path, :read) + input = Arrow::IOMemoryMappedFile.open(tempfile.path, :read) begin - file_reader = ArrowIPC::FileReader.open(input) + file_reader = Arrow::IPCFileReader.open(input) assert_equal(["enabled"], file_reader.schema.fields.collect(&:name)) ensure diff --git a/c_glib/test/test-ipc-stream-writer.rb b/c_glib/test/test-ipc-stream-writer.rb index 62ac45dce2c7..78bb4a7c1743 100644 --- a/c_glib/test/test-ipc-stream-writer.rb +++ b/c_glib/test/test-ipc-stream-writer.rb @@ -20,11 +20,11 @@ class TestIPCStreamWriter < Test::Unit::TestCase def test_write_record_batch tempfile = Tempfile.open("arrow-ipc-stream-writer") - output = ArrowIO::FileOutputStream.open(tempfile.path, false) + output = Arrow::IOFileOutputStream.open(tempfile.path, false) begin field = Arrow::Field.new("enabled", Arrow::BooleanDataType.new) schema = Arrow::Schema.new([field]) - stream_writer = ArrowIPC::StreamWriter.open(output, schema) + stream_writer = Arrow::IPCStreamWriter.open(output, schema) begin columns = [ build_boolean_array([true]), @@ -38,9 +38,9 @@ def test_write_record_batch output.close end - input = ArrowIO::MemoryMappedFile.open(tempfile.path, :read) + input = Arrow::IOMemoryMappedFile.open(tempfile.path, :read) begin - stream_reader = ArrowIPC::StreamReader.open(input) + stream_reader = Arrow::IPCStreamReader.open(input) assert_equal(["enabled"], stream_reader.schema.fields.collect(&:name)) assert_equal(true, diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 5852fe59da09..63724dacc3c9 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -699,6 +699,49 @@ endif() # set(ARROW_TCMALLOC_AVAILABLE 1) # endif() +## Flatbuffers + +if("$ENV{FLATBUFFERS_HOME}" STREQUAL "") + set(FLATBUFFERS_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/flatbuffers_ep-prefix/src/flatbuffers_ep-install") + ExternalProject_Add(flatbuffers_ep + URL "https://github.com/google/flatbuffers/archive/v${FLATBUFFERS_VERSION}.tar.gz" + CMAKE_ARGS + "-DCMAKE_INSTALL_PREFIX:PATH=${FLATBUFFERS_PREFIX}" + "-DFLATBUFFERS_BUILD_TESTS=OFF") + + set(FLATBUFFERS_INCLUDE_DIR "${FLATBUFFERS_PREFIX}/include") + set(FLATBUFFERS_COMPILER "${FLATBUFFERS_PREFIX}/bin/flatc") + set(FLATBUFFERS_VENDORED 1) +else() + find_package(Flatbuffers REQUIRED) + set(FLATBUFFERS_VENDORED 0) +endif() + +message(STATUS "Flatbuffers include dir: ${FLATBUFFERS_INCLUDE_DIR}") +message(STATUS "Flatbuffers compiler: ${FLATBUFFERS_COMPILER}") +include_directories(SYSTEM ${FLATBUFFERS_INCLUDE_DIR}) + +######################################################################## +# HDFS thirdparty setup + +if (DEFINED ENV{HADOOP_HOME}) + set(HADOOP_HOME $ENV{HADOOP_HOME}) + if (NOT EXISTS "${HADOOP_HOME}/include/hdfs.h") + message(STATUS "Did not find hdfs.h in expected location, using vendored one") + set(HADOOP_HOME "${THIRDPARTY_DIR}/hadoop") + endif() +else() + set(HADOOP_HOME "${THIRDPARTY_DIR}/hadoop") +endif() + +set(HDFS_H_PATH "${HADOOP_HOME}/include/hdfs.h") +if (NOT EXISTS ${HDFS_H_PATH}) + message(FATAL_ERROR "Did not find hdfs.h at ${HDFS_H_PATH}") +endif() +message(STATUS "Found hdfs.h at: " ${HDFS_H_PATH}) + +include_directories(SYSTEM "${HADOOP_HOME}/include") + ############################################################ # Linker setup ############################################################ @@ -808,10 +851,37 @@ endif() ############################################################ set(ARROW_LINK_LIBS - ${BOOST_REGEX_LIBRARY}) + ${BOOST_REGEX_LIBRARY}) -set(ARROW_PRIVATE_LINK_LIBS -) +set(ARROW_STATIC_LINK_LIBS) + +set(ARROW_SHARED_PRIVATE_LINK_LIBS + ${BOOST_SYSTEM_LIBRARY} + ${BOOST_FILESYSTEM_LIBRARY}) + +set(ARROW_STATIC_PRIVATE_LINK_LIBS + ${BOOST_SYSTEM_LIBRARY} + ${BOOST_FILESYSTEM_LIBRARY}) + +if (NOT MSVC) + set(ARROW_LINK_LIBS + ${ARROW_LINK_LIBS} + ${CMAKE_DL_LIBS}) +endif() + +if(RAPIDJSON_VENDORED) + set(ARROW_DEPENDENCIES ${ARROW_DEPENDENCIES} rapidjson_ep) +endif() + +if(FLATBUFFERS_VENDORED) + set(ARROW_DEPENDENCIES ${ARROW_DEPENDENCIES} flatbuffers_ep) +endif() + +add_subdirectory(src/arrow) +add_subdirectory(src/arrow/io) +add_subdirectory(src/arrow/ipc) + +set(ARROW_DEPENDENCIES ${ARROW_DEPENDENCIES} metadata_fbs) set(ARROW_SRCS src/arrow/array.cc @@ -827,6 +897,19 @@ set(ARROW_SRCS src/arrow/type.cc src/arrow/visitor.cc + src/arrow/io/file.cc + src/arrow/io/hdfs.cc + src/arrow/io/hdfs-internal.cc + src/arrow/io/interfaces.cc + src/arrow/io/memory.cc + + src/arrow/ipc/feather.cc + src/arrow/ipc/json.cc + src/arrow/ipc/json-internal.cc + src/arrow/ipc/metadata.cc + src/arrow/ipc/reader.cc + src/arrow/ipc/writer.cc + src/arrow/util/bit-util.cc src/arrow/util/decimal.cc ) @@ -838,52 +921,25 @@ if(NOT APPLE AND NOT MSVC) set(ARROW_SHARED_LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/arrow/symbols.map") endif() +set(ARROW_ALL_SRCS + ${ARROW_SRCS}) ADD_ARROW_LIB(arrow - SOURCES ${ARROW_SRCS} + SOURCES ${ARROW_ALL_SRCS} + DEPENDENCIES ${ARROW_DEPENDENCIES} SHARED_LINK_FLAGS ${ARROW_SHARED_LINK_FLAGS} SHARED_LINK_LIBS ${ARROW_LINK_LIBS} + SHARED_PRIVATE_LINK_LIBS ${ARROW_SHARED_PRIVATE_LINK_LIBS} + STATIC_LINK_LIBS ${ARROW_STATIC_LINK_LIBS} + STATIC_PRIVATE_LINK_LIBS ${ARROW_STATIC_PRIVATE_LINK_LIBS} ) -add_subdirectory(src/arrow) -add_subdirectory(src/arrow/io) add_subdirectory(src/arrow/util) if(ARROW_JEMALLOC) add_subdirectory(src/arrow/jemalloc) endif() -#---------------------------------------------------------------------- -# IPC library - -if(ARROW_PYTHON) - set(ARROW_IPC on) -endif() - -## Flatbuffers -if(ARROW_IPC) - if("$ENV{FLATBUFFERS_HOME}" STREQUAL "") - set(FLATBUFFERS_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/flatbuffers_ep-prefix/src/flatbuffers_ep-install") - ExternalProject_Add(flatbuffers_ep - URL "https://github.com/google/flatbuffers/archive/v${FLATBUFFERS_VERSION}.tar.gz" - CMAKE_ARGS - "-DCMAKE_INSTALL_PREFIX:PATH=${FLATBUFFERS_PREFIX}" - "-DFLATBUFFERS_BUILD_TESTS=OFF") - - set(FLATBUFFERS_INCLUDE_DIR "${FLATBUFFERS_PREFIX}/include") - set(FLATBUFFERS_COMPILER "${FLATBUFFERS_PREFIX}/bin/flatc") - set(FLATBUFFERS_VENDORED 1) - else() - find_package(Flatbuffers REQUIRED) - set(FLATBUFFERS_VENDORED 0) - endif() - - message(STATUS "Flatbuffers include dir: ${FLATBUFFERS_INCLUDE_DIR}") - message(STATUS "Flatbuffers compiler: ${FLATBUFFERS_COMPILER}") - include_directories(SYSTEM ${FLATBUFFERS_INCLUDE_DIR}) - add_subdirectory(src/arrow/ipc) -endif() - if(ARROW_PYTHON) find_package(PythonLibsNew REQUIRED) find_package(NumPy REQUIRED) diff --git a/cpp/src/arrow/io/CMakeLists.txt b/cpp/src/arrow/io/CMakeLists.txt index 791c29c2797f..c0199d7ef259 100644 --- a/cpp/src/arrow/io/CMakeLists.txt +++ b/cpp/src/arrow/io/CMakeLists.txt @@ -18,90 +18,9 @@ # ---------------------------------------------------------------------- # arrow_io : Arrow IO interfaces -# HDFS thirdparty setup -if (DEFINED ENV{HADOOP_HOME}) - set(HADOOP_HOME $ENV{HADOOP_HOME}) - if (NOT EXISTS "${HADOOP_HOME}/include/hdfs.h") - message(STATUS "Did not find hdfs.h in expected location, using vendored one") - set(HADOOP_HOME "${THIRDPARTY_DIR}/hadoop") - endif() -else() - set(HADOOP_HOME "${THIRDPARTY_DIR}/hadoop") -endif() - -set(HDFS_H_PATH "${HADOOP_HOME}/include/hdfs.h") -if (NOT EXISTS ${HDFS_H_PATH}) - message(FATAL_ERROR "Did not find hdfs.h at ${HDFS_H_PATH}") -endif() -message(STATUS "Found hdfs.h at: " ${HDFS_H_PATH}) - -include_directories(SYSTEM "${HADOOP_HOME}/include") - -# arrow_io library -if (MSVC) - set(ARROW_IO_STATIC_LINK_LIBS - arrow_static - ) - set(ARROW_IO_SHARED_LINK_LIBS - arrow_shared - ) -else() - set(ARROW_IO_STATIC_LINK_LIBS - arrow_static - ${CMAKE_DL_LIBS} - ) - set(ARROW_IO_SHARED_LINK_LIBS - arrow_shared - ${CMAKE_DL_LIBS} - ) -endif() - -set(ARROW_IO_SHARED_PRIVATE_LINK_LIBS - ${BOOST_SYSTEM_LIBRARY} - ${BOOST_FILESYSTEM_LIBRARY}) - -set(ARROW_IO_STATIC_PRIVATE_LINK_LIBS - ${BOOST_SYSTEM_LIBRARY} - ${BOOST_FILESYSTEM_LIBRARY}) - -set(ARROW_IO_TEST_LINK_LIBS - arrow_io_static) - -set(ARROW_IO_SRCS - file.cc - hdfs.cc - hdfs-internal.cc - interfaces.cc - memory.cc -) - -if(NOT APPLE AND NOT MSVC) - # Localize thirdparty symbols using a linker version script. This hides them - # from the client application. The OS X linker does not support the - # version-script option. - set(ARROW_IO_LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/symbols.map") -endif() - -ADD_ARROW_LIB(arrow_io - SOURCES ${ARROW_IO_SRCS} - SHARED_LINK_FLAGS ${ARROW_IO_LINK_FLAGS} - SHARED_LINK_LIBS ${ARROW_IO_SHARED_LINK_LIBS} - SHARED_PRIVATE_LINK_LIBS ${ARROW_IO_SHARED_PRIVATE_LINK_LIBS} - STATIC_LINK_LIBS ${ARROW_IO_STATIC_LINK_LIBS} - STATIC_PRIVATE_LINK_LIBS ${ARROW_IO_STATIC_PRIVATE_LINK_LIBS} -) - ADD_ARROW_TEST(io-file-test) -ARROW_TEST_LINK_LIBRARIES(io-file-test - ${ARROW_IO_TEST_LINK_LIBS}) - ADD_ARROW_TEST(io-hdfs-test) -ARROW_TEST_LINK_LIBRARIES(io-hdfs-test - ${ARROW_IO_TEST_LINK_LIBS}) - ADD_ARROW_TEST(io-memory-test) -ARROW_TEST_LINK_LIBRARIES(io-memory-test - ${ARROW_IO_TEST_LINK_LIBS}) # Headers: top level install(FILES @@ -110,11 +29,3 @@ install(FILES interfaces.h memory.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/arrow/io") - -# pkg-config support -configure_file(arrow-io.pc.in - "${CMAKE_CURRENT_BINARY_DIR}/arrow-io.pc" - @ONLY) -install( - FILES "${CMAKE_CURRENT_BINARY_DIR}/arrow-io.pc" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/") diff --git a/cpp/src/arrow/io/arrow-io.pc.in b/cpp/src/arrow/io/arrow-io.pc.in deleted file mode 100644 index 61af3577f5a3..000000000000 --- a/cpp/src/arrow/io/arrow-io.pc.in +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -prefix=@CMAKE_INSTALL_PREFIX@ -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ -includedir=${prefix}/include - -so_version=@ARROW_SO_VERSION@ -abi_version=@ARROW_ABI_VERSION@ - -Name: Apache Arrow I/O -Description: I/O interface for Arrow. -Version: @ARROW_VERSION@ -Libs: -L${libdir} -larrow_io -Cflags: -I${includedir} -Requires: arrow diff --git a/cpp/src/arrow/io/symbols.map b/cpp/src/arrow/io/symbols.map deleted file mode 100644 index 1e87caef9c8c..000000000000 --- a/cpp/src/arrow/io/symbols.map +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. See accompanying LICENSE file. - -{ - # Symbols marked as 'local' are not exported by the DSO and thus may not - # be used by client applications. - local: - # devtoolset / static-libstdc++ symbols - __cxa_*; - - extern "C++" { - # boost - boost::*; - - # devtoolset or -static-libstdc++ - the Red Hat devtoolset statically - # links c++11 symbols into binaries so that the result may be executed on - # a system with an older libstdc++ which doesn't include the necessary - # c++11 symbols. - std::*; - }; -}; diff --git a/cpp/src/arrow/ipc/CMakeLists.txt b/cpp/src/arrow/ipc/CMakeLists.txt index c6880c56e466..37b455395644 100644 --- a/cpp/src/arrow/ipc/CMakeLists.txt +++ b/cpp/src/arrow/ipc/CMakeLists.txt @@ -16,85 +16,24 @@ # under the License. ####################################### -# arrow_ipc -####################################### - -set(ARROW_IPC_SHARED_LINK_LIBS - arrow_io_shared - arrow_shared -) - -set(ARROW_IPC_TEST_LINK_LIBS - arrow_ipc_static - arrow_io_static - arrow_static - ${BOOST_REGEX_LIBRARY}) - -set(ARROW_IPC_SRCS - feather.cc - json.cc - json-internal.cc - metadata.cc - reader.cc - writer.cc -) - -if(NOT MSVC AND NOT APPLE) - # Localize thirdparty symbols using a linker version script. This hides them - # from the client application. The OS X linker does not support the - # version-script option. - set(ARROW_IPC_LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/symbols.map") -endif() - -if(RAPIDJSON_VENDORED) - set(IPC_DEPENDENCIES ${IPC_DEPENDENCIES} rapidjson_ep) -endif() - -if(FLATBUFFERS_VENDORED) - set(IPC_DEPENDENCIES ${IPC_DEPENDENCIES} flatbuffers_ep) -endif() - -ADD_ARROW_LIB(arrow_ipc - SOURCES ${ARROW_IPC_SRCS} - DEPENDENCIES ${IPC_DEPENDENCIES} - SHARED_LINK_FLAGS ${ARROW_IPC_LINK_FLAGS} - SHARED_LINK_LIBS ${ARROW_IPC_SHARED_LINK_LIBS} - STATIC_LINK_LIBS ${ARROW_IO_SHARED_PRIVATE_LINK_LIBS} -) +# Messaging and interprocess communication ADD_ARROW_TEST(feather-test) -ARROW_TEST_LINK_LIBRARIES(feather-test - ${ARROW_IPC_TEST_LINK_LIBS}) - ADD_ARROW_TEST(ipc-read-write-test) -ARROW_TEST_LINK_LIBRARIES(ipc-read-write-test - ${ARROW_IPC_TEST_LINK_LIBS}) - ADD_ARROW_TEST(ipc-json-test) -ARROW_TEST_LINK_LIBRARIES(ipc-json-test - ${ARROW_IPC_TEST_LINK_LIBS}) - ADD_ARROW_TEST(json-integration-test) -ARROW_TEST_LINK_LIBRARIES(json-integration-test - ${ARROW_IPC_TEST_LINK_LIBS}) if (ARROW_BUILD_TESTS) target_link_libraries(json-integration-test - gflags - gtest - ${BOOST_FILESYSTEM_LIBRARY} - ${BOOST_SYSTEM_LIBRARY}) + gflags) if (UNIX) if (APPLE) - target_link_libraries(json-integration-test - ${CMAKE_DL_LIBS}) set_target_properties(json-integration-test PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") else() target_link_libraries(json-integration-test - pthread - ${CMAKE_DL_LIBS}) + pthread) endif() endif() endif() @@ -127,6 +66,7 @@ if(FLATBUFFERS_VENDORED) else() set(FBS_DEPENDS ${ABS_FBS_SRC}) endif() + add_custom_command( OUTPUT ${FBS_OUTPUT_FILES} COMMAND ${FLATBUFFERS_COMPILER} -c -o ${OUTPUT_DIR} ${ABS_FBS_SRC} @@ -136,7 +76,6 @@ add_custom_command( ) add_custom_target(metadata_fbs DEPENDS ${FBS_OUTPUT_FILES}) -add_dependencies(arrow_ipc_objlib metadata_fbs) # Headers: top level install(FILES @@ -148,26 +87,14 @@ install(FILES writer.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/arrow/ipc") -# pkg-config support -configure_file(arrow-ipc.pc.in - "${CMAKE_CURRENT_BINARY_DIR}/arrow-ipc.pc" - @ONLY) -install( - FILES "${CMAKE_CURRENT_BINARY_DIR}/arrow-ipc.pc" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/") - if(MSVC) set(UTIL_LINK_LIBS - arrow_ipc_static - arrow_io_static arrow_static ${BOOST_FILESYSTEM_LIBRARY} ${BOOST_SYSTEM_LIBRARY} ${BOOST_REGEX_LIBRARY}) else() set(UTIL_LINK_LIBS - arrow_ipc_static - arrow_io_static arrow_static ${BOOST_FILESYSTEM_LIBRARY} ${BOOST_SYSTEM_LIBRARY} @@ -183,5 +110,3 @@ if (ARROW_BUILD_UTILITIES) endif() ADD_ARROW_BENCHMARK(ipc-read-write-benchmark) -ARROW_BENCHMARK_LINK_LIBRARIES(ipc-read-write-benchmark - ${ARROW_IPC_TEST_LINK_LIBS}) diff --git a/cpp/src/arrow/ipc/arrow-ipc.pc.in b/cpp/src/arrow/ipc/arrow-ipc.pc.in deleted file mode 100644 index 29a942acf033..000000000000 --- a/cpp/src/arrow/ipc/arrow-ipc.pc.in +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -prefix=@CMAKE_INSTALL_PREFIX@ -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ -includedir=${prefix}/include - -so_version=@ARROW_SO_VERSION@ -abi_version=@ARROW_ABI_VERSION@ - -Name: Apache Arrow IPC -Description: IPC extension for Arrow. -Version: @ARROW_VERSION@ -Libs: -L${libdir} -larrow_ipc -Cflags: -I${includedir} -Requires: arrow-io diff --git a/cpp/src/arrow/ipc/symbols.map b/cpp/src/arrow/ipc/symbols.map deleted file mode 100644 index 1e87caef9c8c..000000000000 --- a/cpp/src/arrow/ipc/symbols.map +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. See accompanying LICENSE file. - -{ - # Symbols marked as 'local' are not exported by the DSO and thus may not - # be used by client applications. - local: - # devtoolset / static-libstdc++ symbols - __cxa_*; - - extern "C++" { - # boost - boost::*; - - # devtoolset or -static-libstdc++ - the Red Hat devtoolset statically - # links c++11 symbols into binaries so that the result may be executed on - # a system with an older libstdc++ which doesn't include the necessary - # c++11 symbols. - std::*; - }; -}; diff --git a/cpp/src/arrow/python/CMakeLists.txt b/cpp/src/arrow/python/CMakeLists.txt index 604527f6304a..8f7991e7f683 100644 --- a/cpp/src/arrow/python/CMakeLists.txt +++ b/cpp/src/arrow/python/CMakeLists.txt @@ -35,8 +35,6 @@ endif() set(ARROW_PYTHON_MIN_TEST_LIBS arrow_python_test_main arrow_python_static - arrow_ipc_static - arrow_io_static arrow_static ${BOOST_REGEX_LIBRARY}) @@ -61,8 +59,6 @@ set(ARROW_PYTHON_SRCS ) set(ARROW_PYTHON_SHARED_LINK_LIBS - arrow_io_shared - arrow_ipc_shared arrow_shared ) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 463a29d87b71..3e8652175734 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -244,17 +244,11 @@ endfunction(bundle_arrow_lib) if (PYARROW_BUNDLE_ARROW_CPP) # arrow bundle_arrow_lib(ARROW_SHARED_LIB) - bundle_arrow_lib(ARROW_IO_SHARED_LIB) - bundle_arrow_lib(ARROW_IPC_SHARED_LIB) bundle_arrow_lib(ARROW_PYTHON_SHARED_LIB) endif() ADD_THIRDPARTY_LIB(arrow SHARED_LIB ${ARROW_SHARED_LIB}) -ADD_THIRDPARTY_LIB(arrow_io - SHARED_LIB ${ARROW_IO_SHARED_LIB}) -ADD_THIRDPARTY_LIB(arrow_ipc - SHARED_LIB ${ARROW_IPC_SHARED_LIB}) ADD_THIRDPARTY_LIB(arrow_python SHARED_LIB ${ARROW_PYTHON_SHARED_LIB}) @@ -279,8 +273,6 @@ set(CYTHON_EXTENSIONS set(LINK_LIBS arrow_shared - arrow_io_shared - arrow_ipc_shared arrow_python_shared ) diff --git a/python/cmake_modules/FindArrow.cmake b/python/cmake_modules/FindArrow.cmake index c2ca0f4ad22c..51a887189ccd 100644 --- a/python/cmake_modules/FindArrow.cmake +++ b/python/cmake_modules/FindArrow.cmake @@ -55,16 +55,6 @@ else() get_filename_component(ARROW_LIBS ${ARROW_LIB_PATH} DIRECTORY) endif() -find_library(ARROW_IO_LIB_PATH NAMES arrow_io - PATHS - ${ARROW_SEARCH_LIB_PATH} - NO_DEFAULT_PATH) - -find_library(ARROW_IPC_LIB_PATH NAMES arrow_ipc - PATHS - ${ARROW_SEARCH_LIB_PATH} - NO_DEFAULT_PATH) - find_library(ARROW_JEMALLOC_LIB_PATH NAMES arrow_jemalloc PATHS ${ARROW_SEARCH_LIB_PATH} @@ -78,20 +68,12 @@ find_library(ARROW_PYTHON_LIB_PATH NAMES arrow_python if (ARROW_INCLUDE_DIR AND ARROW_LIBS) set(ARROW_FOUND TRUE) set(ARROW_LIB_NAME libarrow) - set(ARROW_IO_LIB_NAME libarrow_io) - set(ARROW_IPC_LIB_NAME libarrow_ipc) set(ARROW_JEMALLOC_LIB_NAME libarrow_jemalloc) set(ARROW_PYTHON_LIB_NAME libarrow_python) set(ARROW_STATIC_LIB ${ARROW_SEARCH_LIB_PATH}/${ARROW_LIB_NAME}.a) set(ARROW_SHARED_LIB ${ARROW_LIBS}/${ARROW_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) - set(ARROW_IO_STATIC_LIB ${ARROW_SEARCH_LIB_PATH}/${ARROW_IO_LIB_NAME}.a) - set(ARROW_IO_SHARED_LIB ${ARROW_LIBS}/${ARROW_IO_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) - - set(ARROW_IPC_STATIC_LIB ${ARROW_SEARCH_LIB_PATH}/${ARROW_IPC_LIB_NAME}.a) - set(ARROW_IPC_SHARED_LIB ${ARROW_LIBS}/${ARROW_IPC_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) - set(ARROW_JEMALLOC_STATIC_LIB ${ARROW_SEARCH_LIB_PATH}/${ARROW_JEMALLOC_LIB_NAME}.a) set(ARROW_JEMALLOC_SHARED_LIB ${ARROW_LIBS}/${ARROW_JEMALLOC_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) @@ -100,8 +82,6 @@ if (ARROW_INCLUDE_DIR AND ARROW_LIBS) if (NOT Arrow_FIND_QUIETLY) message(STATUS "Found the Arrow core library: ${ARROW_LIB_PATH}") - message(STATUS "Found the Arrow IO library: ${ARROW_IO_LIB_PATH}") - message(STATUS "Found the Arrow IPC library: ${ARROW_IPC_LIB_PATH}") message(STATUS "Found the Arrow jemalloc library: ${ARROW_JEMALLOC_LIB_PATH}") endif () else () @@ -123,10 +103,6 @@ mark_as_advanced( ARROW_LIBS ARROW_STATIC_LIB ARROW_SHARED_LIB - ARROW_IO_STATIC_LIB - ARROW_IO_SHARED_LIB - ARROW_IPC_STATIC_LIB - ARROW_IPC_SHARED_LIB ARROW_JEMALLOC_STATIC_LIB ARROW_JEMALLOC_SHARED_LIB ) diff --git a/python/setup.py b/python/setup.py index ba77e688ae1f..99bac15c779e 100644 --- a/python/setup.py +++ b/python/setup.py @@ -224,8 +224,6 @@ def move_lib(lib_name): if self.bundle_arrow_cpp: move_lib("arrow") - move_lib("arrow_io") - move_lib("arrow_ipc") move_lib("arrow_python") if self.with_jemalloc: move_lib("arrow_jemalloc")