arrow icon indicating copy to clipboard operation
arrow copied to clipboard

ARROW-18174: [R] Fix compile of altrep.cpp on some builds

Open paleolimbot opened this issue 2 years ago • 10 comments

After ARROW-17187 (#14271), we get at least two nightly build failures because of how cpp11 objects are constructed in some new test functions. This PR makes the constructors less ambiguous so that no compilers give us trouble!

paleolimbot avatar Oct 27 '22 12:10 paleolimbot

@github-actions crossbow submit test-r-gcc-12 test-r-rhub-ubuntu-gcc-release-latest

paleolimbot avatar Oct 27 '22 12:10 paleolimbot

https://issues.apache.org/jira/browse/ARROW-18174

github-actions[bot] avatar Oct 27 '22 13:10 github-actions[bot]

:warning: Ticket has not been started in JIRA, please click 'Start Progress'.

github-actions[bot] avatar Oct 27 '22 13:10 github-actions[bot]

Revision: 1e4de75dc08bd960a37ab152572d00e1ba977325

Submitted crossbow builds: ursacomputing/crossbow @ actions-034ae4ff37

Task Status
test-r-gcc-12 Github Actions
test-r-rhub-ubuntu-gcc-release-latest Azure

github-actions[bot] avatar Oct 27 '22 13:10 github-actions[bot]

@github-actions crossbow submit test-r-gcc-12 test-r-rhub-ubuntu-gcc-release-latest

paleolimbot avatar Oct 28 '22 00:10 paleolimbot

Revision: 8b2ae883d2a425b6a2528350435d6797220f7c51

Submitted crossbow builds: ursacomputing/crossbow @ actions-411e83beb7

Task Status
test-r-gcc-12 Github Actions
test-r-rhub-ubuntu-gcc-release-latest Azure

github-actions[bot] avatar Oct 28 '22 00:10 github-actions[bot]

@github-actions crossbow submit test-r-gcc-12 test-r-rhub-ubuntu-gcc-release-latest

paleolimbot avatar Oct 28 '22 12:10 paleolimbot

Revision: fc514d0ead58f34dfc609873017559f7db913d2d

Submitted crossbow builds: ursacomputing/crossbow @ actions-b8ea8d97c9

Task Status
test-r-gcc-12 Github Actions
test-r-rhub-ubuntu-gcc-release-latest Azure

github-actions[bot] avatar Oct 28 '22 14:10 github-actions[bot]

@github-actions crossbow submit test-r-linux-valgrind homebrew-r-autobrew

paleolimbot avatar Oct 28 '22 14:10 paleolimbot

Revision: fc514d0ead58f34dfc609873017559f7db913d2d

Submitted crossbow builds: ursacomputing/crossbow @ actions-c5c1f0e15d

Task Status
homebrew-r-autobrew Github Actions
test-r-linux-valgrind Azure

github-actions[bot] avatar Oct 28 '22 16:10 github-actions[bot]

Benchmark runs are scheduled for baseline = c7d97307925b08c6573a5f14d8a2222c116a0f88 and contender = e91d228c8dae139664c4bfa78b86484a2cd2484e. e91d228c8dae139664c4bfa78b86484a2cd2484e is a master commit associated with this PR. Results will be available as each benchmark for each run completes. Conbench compare runs links: [Finished :arrow_down:0.0% :arrow_up:0.0%] ec2-t3-xlarge-us-east-2 [Failed :arrow_down:0.0% :arrow_up:0.0%] test-mac-arm [Failed :arrow_down:0.0% :arrow_up:0.0%] ursa-i9-9960x [Finished :arrow_down:0.29% :arrow_up:0.04%] ursa-thinkcentre-m75q Buildkite builds: [Finished] e91d228c ec2-t3-xlarge-us-east-2 [Failed] e91d228c test-mac-arm [Failed] e91d228c ursa-i9-9960x [Finished] e91d228c ursa-thinkcentre-m75q [Finished] c7d97307 ec2-t3-xlarge-us-east-2 [Failed] c7d97307 test-mac-arm [Finished] c7d97307 ursa-i9-9960x [Finished] c7d97307 ursa-thinkcentre-m75q Supported benchmarks: ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True test-mac-arm: Supported benchmark langs: C++, Python, R ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

ursabot avatar Oct 31 '22 16:10 ursabot

@github-actions crossbow submit test-r-devdocs

kou avatar Nov 27 '22 19:11 kou

Revision: ec2452d911aff2df2cacdc1db890f9d929c1b845

Submitted crossbow builds: ursacomputing/crossbow @ actions-89486fcd3f

Task Status
test-r-devdocs Github Actions

github-actions[bot] avatar Nov 27 '22 19:11 github-actions[bot]

@paleolimbot Could you open an issue for https://github.com/ursacomputing/crossbow/actions/runs/3559717769/jobs/5979255297#step:9:2818 ?

C:/rtools40/mingw64/bin/g++ -shared -s -static-libgcc -o arrow.dll tmp.def RTasks.o altrep.o array.o array_to_vector.o arraydata.o arrowExports.o bridge.o buffer.o chunkedarray.o compression.o compute-exec.o compute.o config.o csv.o dataset.o datatype.o expression.o extension-impl.o feather.o field.o filesystem.o imports.o io.o json.o memorypool.o message.o parquet.o r_to_arrow.o recordbatch.o recordbatchreader.o recordbatchwriter.o safe-call-into-r-impl.o scalar.o schema.o symbols.o table.o threadpool.o type_infer.o -LD:/a/crossbow/crossbow/dist/lib -LC:/rtools40/mingw64/lib -larrow_dataset -lparquet -larrow C:/rtools40/mingw64/lib/libre2.a -lthrift -lz -LC:/R/bin/x64 -lR
C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: altrep.o:altrep.cpp:(.text+0x544d): undefined reference to `arrow::internal::ChunkResolver::ChunkResolver(std::vector<std::shared_ptr<arrow::Array>, std::allocator<std::shared_ptr<arrow::Array> > > const&)'
C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: altrep.o:altrep.cpp:(.text+0x5898): undefined reference to `arrow::internal::ChunkResolver::ChunkResolver(std::vector<std::shared_ptr<arrow::Array>, std::allocator<std::shared_ptr<arrow::Array> > > const&)'
C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: altrep.o:altrep.cpp:(.text+0x599c): undefined reference to `arrow::internal::ChunkResolver::ChunkResolver(std::vector<std::shared_ptr<arrow::Array>, std::allocator<std::shared_ptr<arrow::Array> > > const&)'
C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: altrep.o:altrep.cpp:(.text+0x5a5b): undefined reference to `arrow::internal::ChunkResolver::ChunkResolver(std::vector<std::shared_ptr<arrow::Array>, std::allocator<std::shared_ptr<arrow::Array> > > const&)'
C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: altrep.o:altrep.cpp:(.text+0x5ad7): undefined reference to `arrow::internal::ChunkResolver::ChunkResolver(std::vector<std::shared_ptr<arrow::Array>, std::allocator<std::shared_ptr<arrow::Array> > > const&)'
collect2.exe: error: ld returned 1 exit status

The following patch may fix the error:

diff --git a/cpp/src/arrow/chunk_resolver.h b/cpp/src/arrow/chunk_resolver.h
index 1a63d26c24..818070ffe3 100644
--- a/cpp/src/arrow/chunk_resolver.h
+++ b/cpp/src/arrow/chunk_resolver.h
@@ -32,7 +32,7 @@ struct ChunkLocation {
 };
 
 // An object that resolves an array chunk depending on a logical index
-struct ChunkResolver {
+struct ARROW_EXPORT ChunkResolver {
   explicit ChunkResolver(const ArrayVector& chunks);
 
   explicit ChunkResolver(const std::vector<const Array*>& chunks);

kou avatar Nov 27 '22 21:11 kou

Done! See ARROW-18412

paleolimbot avatar Nov 27 '22 22:11 paleolimbot

Thanks! Do you want to fix this problem? Or do you want me to do it?

kou avatar Nov 28 '22 21:11 kou

I can give it a go tomorrow (but all I know how to do here is copy/paste what you suggested above!)

paleolimbot avatar Nov 28 '22 22:11 paleolimbot

OK! If there is a problem with the suggestion, please let me know.

kou avatar Nov 29 '22 00:11 kou