Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.1.0 build no longer uses start-group/end-group linker flags (on native platform) #3282

Closed
nomis opened this issue Nov 20, 2019 · 2 comments
Closed
Assignees
Labels
bug
Milestone

Comments

@nomis
Copy link
Contributor

@nomis nomis commented Nov 20, 2019

Configuration

Operating system: Ubuntu 18.04.3

PlatformIO Version (platformio --version): 4.1.0

Description of problem

Builds with the native platform no longer pass start-group/end-group around libraries specified as linker arguments, which is causing my builds to fail. If I manually add these back then the final link step works. Builds on other platforms always use these arguments. This worked on 4.0.3.

Steps to Reproduce

  1. git clone https://github.com/nomis/mcu-uuid-console
  2. cd mcu-uuid-console/test
  3. platformio run -d build/example-DigitalIO -e native -v

(at commit 6250f04e30d6cc78203f4c3b488cdc875df65013)

Actual Results

...
g++ -o .pio/build/native/program .pio/build/native/src/Arduino.o .pio/build/native/src/DigitalIO.o -L.pio/build/native .pio/build/native/lib7db/libuuid-common_ID6624.a .pio/build/native/libe72/libuuid-log_ID6625.a .pio/build/native/lib380/libuuid-console.a
.pio/build/native/libe72/libuuid-log_ID6625.a(log.o): In function `std::_Sp_counted_ptr_inplace<uuid::log::Message, std::allocator<uuid::log::Message>, (__gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&)':
log.cpp:(.text._ZNSt23_Sp_counted_ptr_inplaceIN4uuid3log7MessageESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info[_ZNSt23_Sp_counted_ptr_inplaceIN4uuid3log7MessageESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info]+0xb): undefined reference to `typeinfo name for std::_Sp_make_shared_tag'
.pio/build/native/libe72/libuuid-log_ID6625.a(log.o): In function `std::shared_ptr<uuid::log::Message> std::make_shared<uuid::log::Message, unsigned long, uuid::log::Level&, uuid::log::Facility&, __FlashStringHelper const* const&, char*>(unsigned long&&, uuid::log::Level&, uuid::log::Facility&, __FlashStringHelper const* const&, char*&&)':
log.cpp:(.text._ZSt11make_sharedIN4uuid3log7MessageEJmRNS1_5LevelERNS1_8FacilityERKPK19__FlashStringHelperPcEESt10shared_ptrIT_EDpOT0_[_ZSt11make_sharedIN4uuid3log7MessageEJmRNS1_5LevelERNS1_8FacilityERKPK19__FlashStringHelperPcEESt10shared_ptrIT_EDpOT0_]+0x152): undefined reference to `typeinfo for std::_Sp_make_shared_tag'
.pio/build/native/libe72/libuuid-log_ID6625.a(log.o):(.data.rel.ro._ZTISt23_Sp_counted_ptr_inplaceIN4uuid3log7MessageESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE[_ZTISt23_Sp_counted_ptr_inplaceIN4uuid3log7MessageESaIS2_ELN9__gnu_cxx12_Lock_policyE2EE]+0x10): undefined reference to `typeinfo for std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>'
.pio/build/native/libe72/libuuid-log_ID6625.a(format_timestamp_ms.o): In function `uuid::log::format_timestamp_ms[abi:cxx11](unsigned long, unsigned int)':
format_timestamp_ms.cpp:(.text+0xb0): undefined reference to `snprintf_P(char*, unsigned long, char const*, ...)'
collect2: error: ld returned 1 exit status
*** [.pio/build/native/program] Error 1

Expected Results

...
g++ -o .pio/build/native/program .pio/build/native/src/Arduino.o .pio/build/native/src/DigitalIO.o -L.pio/build/native -Wl,--start-group .pio/build/native/lib7db/libuuid-common_ID6624.a .pio/build/native/libe72/libuuid-log_ID6625.a .pio/build/native/lib380/libuuid-console.a -Wl,--end-group
============================================================================================================================ [SUCCESS] Took 2.43 seconds ============================================================================================================================
@nomis

This comment has been minimized.

Copy link
Contributor Author

@nomis nomis commented Nov 21, 2019

This commit moves _build_project_deps to the other side of the prepend/append of start-group/end-group, but reverting it on its own from v4.1.0 doesn't fix the issue:

commit 234585dc97c24c05f1c24b5ff590c301b9cb726f
Author: Ivan Kravets <me@ikravets.com>
Date:   Thu Oct 24 16:39:11 2019 +0300

     Fixed an issue with project generator when ``src_build_flags`` were not respected // Resolve #3137

:100644 100644 43e0ec6ee6183fd6401a16cfb57b92984d9c33f5 df2da41ffc8a91d9af793537fa4adb26ea8c8488 M	HISTORY.rst
:040000 040000 40882d28e7c1938a39f2ba84b6e978f291e414f2 32ca832f773f333d668805aeb8bf9896fd548c05 M	platformio
git bisect start
# good: [60f0f775ef6bb100ec0909786664f3f0e8d49e08] Merge branch 'release/v4.0.3'
git bisect good 60f0f775ef6bb100ec0909786664f3f0e8d49e08
# bad: [5a89388fb02a87a54f125092fb5efbee6ae01508] Merge branch 'release/v4.1.0'
git bisect bad 5a89388fb02a87a54f125092fb5efbee6ae01508
# skip: [f5807364e84a2c76c9b8222804c05211b0eb6f2a] Force to "backslashreplace" when UnicodeEncodeError arises when writing file // Issue #2796
git bisect skip f5807364e84a2c76c9b8222804c05211b0eb6f2a
# skip: [065607b68c4c900341c2a6ba4ae028b4b4e7fe92] Disable PyLint's "import-outside-toplevel"
git bisect skip 065607b68c4c900341c2a6ba4ae028b4b4e7fe92
# bad: [0194e094106bba97eed0cbe15b676abe5b5472fb] Use simple abspath to get absolute path to file with defect
git bisect bad 0194e094106bba97eed0cbe15b676abe5b5472fb
# skip: [0f7fe260d1e5fbfe44030b663f55007b73cbab6e] Docs: Sync ESP32 dev platform
git bisect skip 0f7fe260d1e5fbfe44030b663f55007b73cbab6e
# skip: [e5d50eb45c8bdfd567b10629a4b51b3962f7a4ac] Docs: RV-LINK debug tool, sync GDV32 dev/platform
git bisect skip e5d50eb45c8bdfd567b10629a4b51b3962f7a4ac
# skip: [3d5c1411c05cce892f65ab59183258bdc1c05e06] Fix PyLint for PY2
git bisect skip 3d5c1411c05cce892f65ab59183258bdc1c05e06
# skip: [9ce19c7e831838c455f29ba5780f25986232ac52] Skip debug sections when calculating sizedata
git bisect skip 9ce19c7e831838c455f29ba5780f25986232ac52
# skip: [9fef7f0ba901275b2c26605c56829f6c17d12a86] Docs: Sync TI MSP430 dev/platfom
git bisect skip 9fef7f0ba901275b2c26605c56829f6c17d12a86
# skip: [47e297fecb8a89c28cd2aa1897e1e5c3a9ac2b24] Use less verbose debug output
git bisect skip 47e297fecb8a89c28cd2aa1897e1e5c3a9ac2b24
# skip: [1b74f380a616c3f5025056a60c577d30faad8264] Refactor appending of debugging flags
git bisect skip 1b74f380a616c3f5025056a60c577d30faad8264
# skip: [10bada0bccea0494aaa15ee8ecb2a4f445da77b5] ManifestPaser: handle examples from "Examples" folder
git bisect skip 10bada0bccea0494aaa15ee8ecb2a4f445da77b5
# skip: [3dcf1784fb1db0a0dee20ec50b63df73e41b5f01] Update PIO Remote to 2.5.5
git bisect skip 3dcf1784fb1db0a0dee20ec50b63df73e41b5f01
# skip: [5d7e7b17969f0834849cb0d2e94fa7528e46d74e] DataModel: capture exceptions from failed models in non-strict mode
git bisect skip 5d7e7b17969f0834849cb0d2e94fa7528e46d74e
# skip: [744881da59f6d586cf7512350b68206f7d5a24ff] Refactor DataModel with a strict type declaration
git bisect skip 744881da59f6d586cf7512350b68206f7d5a24ff
# skip: [46be56af43c113528ce2994fb7a846011caa8471] Bump version to 4.1.0b3
git bisect skip 46be56af43c113528ce2994fb7a846011caa8471
# skip: [d44c60614d59069f295b98b19bbbf66efeb85fb6] Use direct LDSCRIPT_PATH only if script resolves
git bisect skip d44c60614d59069f295b98b19bbbf66efeb85fb6
# good: [5f044a7948eb334d97c3ff3ecc891cbd2049ee83] Merge tag 'v4.0.3' into develop
git bisect good 5f044a7948eb334d97c3ff3ecc891cbd2049ee83
# skip: [be9aaf8902659587542047bf51b240efa5a65b23] Be compatible with Python 3.8, on Windows skip HOME and check for USERPROFILE
git bisect skip be9aaf8902659587542047bf51b240efa5a65b23
# good: [92cd03cf2af3a9e0d3d78436d54ac01978c0e19e] Sync docs
git bisect good 92cd03cf2af3a9e0d3d78436d54ac01978c0e19e
# good: [2c242944c7021112db9ad974c96df3e42454d216] Fixed default PIO Unified Debugger configuration for J-Link probe
git bisect good 2c242944c7021112db9ad974c96df3e42454d216
# skip: [a785c238b1778d5907b3b6d106a2462069fc2cb0] Use OS-native directory separator in sizedata report
git bisect skip a785c238b1778d5907b3b6d106a2462069fc2cb0
# good: [ca29b4e370ebc7f2bad38c283cb1296c9124b283] Fixed "DeprecationWarning: the imp module is deprecated in favour of importlib" PY2/PY3
git bisect good ca29b4e370ebc7f2bad38c283cb1296c9124b283
# skip: [a481a5dedad8c45fa5fe362b47eb1e9876938bc5] Fix issue with "remote test" // Resolve #3127
git bisect skip a481a5dedad8c45fa5fe362b47eb1e9876938bc5
# skip: [941c0f4297e647c9ad8a2cb66875f621e7828c68] Improve the speed of memory use report generation
git bisect skip 941c0f4297e647c9ad8a2cb66875f621e7828c68
# bad: [5573c3871cc4d16d945478ae12e3f12e1dd578fa] Allow cppcheck suppress individual defects by default
git bisect bad 5573c3871cc4d16d945478ae12e3f12e1dd578fa
# skip: [239befa4eeb4535854c215ce0817f7e57d2326f4] New Shakti dev/platform
git bisect skip 239befa4eeb4535854c215ce0817f7e57d2326f4
# skip: [36acdd77976cddf24b8d88b6f1262744af5586e6] DataModel: allow valid values in non-strict mode for TypeOfList and TypeOfDict
git bisect skip 36acdd77976cddf24b8d88b6f1262744af5586e6
# bad: [8a6892bf3ce65e3f2b3f7134737272c4bd0e974a] Fixed an issue with invalid encoding when generating project for Visual Studio // Issue #3183
git bisect bad 8a6892bf3ce65e3f2b3f7134737272c4bd0e974a
# skip: [4366719ed2a93eda29717a9b185f652653653c11] Restore missed project helpers needed by "platformio-node-helpers"
git bisect skip 4366719ed2a93eda29717a9b185f652653653c11
# skip: [dee2d2c538c005c07968d8f35bfde72e53a6a6aa] Add manifest parsers for platform.json and package.json
git bisect skip dee2d2c538c005c07968d8f35bfde72e53a6a6aa
# skip: [2e9b0066de246f4b1f1520d080b9d5fcf94c349d] Capture manifest parser exceptions
git bisect skip 2e9b0066de246f4b1f1520d080b9d5fcf94c349d
# skip: [d38c843574ee5221a8a11766e348354f203da938] Fixed an issue when installing a package using custom Git tag and submodules were not updated correctly // Resolve #3060
git bisect skip d38c843574ee5221a8a11766e348354f203da938
# skip: [eda02750ae489d6c4f7b978c98ac213da75aca03] Export files as list instead of dict for sizedata target
git bisect skip eda02750ae489d6c4f7b978c98ac213da75aca03
# skip: [c2970631a5c4365efc2c5d4d3c40cd5feb905a88] Add "--force" for git update // Issue #3060
git bisect skip c2970631a5c4365efc2c5d4d3c40cd5feb905a88
# skip: [55d905a0d04a705d7e9267b83a29742d1039eeb9] Add a new RPC method "project.config_call" for Home API
git bisect skip 55d905a0d04a705d7e9267b83a29742d1039eeb9
# skip: [7ba2a7cd3d32f674e3544ada10514569694f6dff] Bump version to 4.1.0b2
git bisect skip 7ba2a7cd3d32f674e3544ada10514569694f6dff
# skip: [971eb8e35c7fbb54bd5c86e3f9a923e774d595f6] Revert back unix style directory separator in sizedata report
git bisect skip 971eb8e35c7fbb54bd5c86e3f9a923e774d595f6
# skip: [971cd2ca0fa92c115bdc4b9a08632d151511f167] Export device info in pair with sizedata
git bisect skip 971cd2ca0fa92c115bdc4b9a08632d151511f167
# skip: [82ec0164b0384c59dc434582cb65ca89b42ac6d4] Update docs on how to install Python 3.7 on Windows
git bisect skip 82ec0164b0384c59dc434582cb65ca89b42ac6d4
# skip: [e6ea4cb6134417fb03a838f9c90b4e85cf1aa0e9] PackageManifest: Ignore hidden files for examples
git bisect skip e6ea4cb6134417fb03a838f9c90b4e85cf1aa0e9
# skip: [c8354b100eac8cdba5e0a883bff34fdbe31f0d93] Bump version to 4.1.0b4
git bisect skip c8354b100eac8cdba5e0a883bff34fdbe31f0d93
# skip: [f78a1a7b15a8d180c700b6864b1145c51240e431] Show encoding error when can't read a file  // Issue #2796
git bisect skip f78a1a7b15a8d180c700b6864b1145c51240e431
# skip: [181adb277f26142bbebc1ff1c2039a8cbfbac495] Sync docs
git bisect skip 181adb277f26142bbebc1ff1c2039a8cbfbac495
# skip: [77f8414c639338ea7179067c4f3a70b6d1b4fba5] Better explanation about encoding error  // Resolve #2796
git bisect skip 77f8414c639338ea7179067c4f3a70b6d1b4fba5
# skip: [9a7e5d86fcb0d2be4aa753e630630ea701c00003] Install Black only for Python 3.6+
git bisect skip 9a7e5d86fcb0d2be4aa753e630630ea701c00003
# skip: [4d84d03a636c177c93cf6dc8a962fdd14f91c859] Black
git bisect skip 4d84d03a636c177c93cf6dc8a962fdd14f91c859
# bad: [784a5cd349f56bcf8a66a669ae506e4992b3de81] Add support for "Build Middlewares"
git bisect bad 784a5cd349f56bcf8a66a669ae506e4992b3de81
# skip: [ab5650f84b1c36b8f0319fb7d88f69df2659a394] Use max line length hooks for all systems
git bisect skip ab5650f84b1c36b8f0319fb7d88f69df2659a394
# skip: [536a9566da2a7d049c4499316cbb3f71f43a85d0] Feature/pio size data (#3056)
git bisect skip 536a9566da2a7d049c4499316cbb3f71f43a85d0
# skip: [5cfa2b7fdd2a4843587874576a538449f8f6faf3] Fix typo with UnicodeEncodeError // Issue #2796
git bisect skip 5cfa2b7fdd2a4843587874576a538449f8f6faf3
# skip: [9a3dcd3daa067fd306c1f43019ce5d982399f554] PY2 fix with absolute import
git bisect skip 9a3dcd3daa067fd306c1f43019ce5d982399f554
# skip: [7bcfea13fb5b2daf07f4a4c6f2c9d1cb0412a30b] Fixed an issue with linking process when ``$LDSCRIPT`` contains a space in path
git bisect skip 7bcfea13fb5b2daf07f4a4c6f2c9d1cb0412a30b
# skip: [2137eb17942a13bdd79a692a764da426dfa78f7e] Do not append debug flags to linker stage
git bisect skip 2137eb17942a13bdd79a692a764da426dfa78f7e
# skip: [76865a1730e02e7bd20cf458bf38be2342a6802a] ManifetPatrser fixes (#3080)
git bisect skip 76865a1730e02e7bd20cf458bf38be2342a6802a
# skip: [5f55c183734c9dcb3734875b6f9c2b2dc3e1f55b] Introduce DataModel, package manifest parser and base manifest model
git bisect skip 5f55c183734c9dcb3734875b6f9c2b2dc3e1f55b
# skip: [89843c0d652c7d2a295d7db23a1cd0cde03b61bf] Fix issue with parsing library.properties when export field is used
git bisect skip 89843c0d652c7d2a295d7db23a1cd0cde03b61bf
# good: [dd1da95a40c49ccc2b191bc2f1a3e787bd6d18cf] Fix issue when wrong library was picked up by LDF when framework is not declared
git bisect good dd1da95a40c49ccc2b191bc2f1a3e787bd6d18cf
# bad: [234585dc97c24c05f1c24b5ff590c301b9cb726f]  Fixed an issue with project generator when ``src_build_flags`` were not respected // Resolve #3137
git bisect bad 234585dc97c24c05f1c24b5ff590c301b9cb726f
# good: [0b500dba5468fd4688a46b6501dce291d8f5530c] Handle legacy "system": "all" for package manifest
git bisect good 0b500dba5468fd4688a46b6501dce291d8f5530c
# good: [2388b2a62be5c220736dbf205bb33d413fa04cea] Fixed security issue when extracting items from TAR archive // Issue #2995
git bisect good 2388b2a62be5c220736dbf205bb33d413fa04cea
# first bad commit: [234585dc97c24c05f1c24b5ff590c301b9cb726f]  Fixed an issue with project generator when ``src_build_flags`` were not respected // Resolve #3137
@ivankravets ivankravets added this to the 4.1.1 milestone Nov 21, 2019
@ivankravets ivankravets added the bug label Nov 21, 2019
@ivankravets ivankravets assigned ivankravets and unassigned valeros Nov 21, 2019
@ivankravets

This comment has been minimized.

Copy link
Member

@ivankravets ivankravets commented Nov 21, 2019

Thanks for the report! Please re-test with pio upgrade --dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.